diff --git a/Cargo.toml b/Cargo.toml index 707d803..c4d07cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,7 @@ [workspace] members = [ "crates/*", - "examples/common*", - "examples/bevy_gltf_components/*", - "examples/bevy_gltf_blueprints/*", - "examples/bevy_gltf_save_load/*", - "examples/bevy_registry_export/*", + "examples/blenvy/*", "testing/bevy_example/", ] resolver = "2" diff --git a/Migration_guide.md b/Migration_guide.md new file mode 100644 index 0000000..d8e5ca1 --- /dev/null +++ b/Migration_guide.md @@ -0,0 +1,143 @@ +# Blender add-ons + +- gltf_auto_export and bevy_components have been replaced with a single Blenvy add-on for simplicity + +## Components: + +- no more need to add your components to an empty called xxx_components, you can now directly add your components to the blueprint's collection itself +- you will need to "upgrade" your components from the previous add-on, as they are stored in a completely different way +- bonus: you can also visualize & edit your blueprint's component directly on each instance + +## Multiple components with the same short name + + Up until now , it was not possible to have multiple components with the same name (ie foo::bar::componentA & some::other::componentA) as all the logic was based on short names, + this is not an issue anymore + +## Auto export: + +- the previous stripped down gltf export settings are not part of the add-on anymore, please configure them like this: +- you need to reconfigure your auto export settings , as they have changed significantly as has their storage + +## All the Bevy crates have been replaced with a single one + +- the new crate doesn't even really need configuring, so +- in your cargo.toml file, replace any references to the old crates (bevy_gltf_components, bevy_gltf_blueprints, bevy_registry_export, bevy_gltf_save_load etc) +with: + +```toml +# Cargo.toml +[dependencies] +bevy="0.14" +blenvy = { version = "0.1.0"} +``` + +and set things up in your code: + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugins(BlenvyPlugin) + + .run(); +} +``` + +## Removed almost all setting for the crate + +- the ONLY setting is **aabbs** // defaults to true + +## Legacy mode has been removed + +- less headaches when using the tools! +If you still want to manually specify components using Blender's custom properties you need to + + +## BlueprintName replaced with BlueprintInfo + +- this is a very important change ! to avoid possible path clashes , the ```BlueprintInfo``` component contains +the actual path (with your **assets** folder) to the Blueprint, and a name (for convenience) + +## SpawnHere renamed to SpawnBlueprint + +changed the naming for more clarity & specificity + + +## Automatic assets loading + +- no more need to preload gltf files, you can spawn a level & all its blueprint like this: + +```rust no_run +commands.spawn(( + BlueprintInfo::from_path("levels/World.gltf"), + HideUntilReady, // Only if you want to keep the level hidden until it is finished spawning + SpawnBlueprint, // See note above + GameWorldTag, + InAppRunning, +)); +``` + +Blenvy will take care of loading all needed blueprints & other assets for you + +## Blueprint instance events + +- you can now use the ```BlueprintEvent``` to get notified of crucial blueprint instance events + + * ```AssetsLoaded``` + ```rust no run + /// event fired when a blueprint instance has finished loading all of its assets & before it attempts spawning + AssetsLoaded { + entity: Entity, + blueprint_name: String, + blueprint_path: String, + // TODO: add assets list ? + } + ``` + + * ```InstanceReady``` + ```rust no run + /// event fired when a blueprint instance has completely finished spawning, ie + /// - all its assests have been loaded + /// - all of its child blueprint instances are ready + /// - all the post processing is finished (aabb calculation, material replacements etc) + InstanceReady { + entity: Entity, + blueprint_name: String, + blueprint_path: String, + }, + + ``` + +## BlueprintInstanceDisabled + +you can now query for this component + +## Track loading blueprint instances with the BlueprintSpawning component + +- other than with events, you can also query for the ```BlueprintSpawning``` component to be sure an entity you are manipulating is finished with its blueprint instance spawning process + +## Keep your currently spawning blueprint instances hidden until they are ready with the HideUntilReady component + +If you want your blueprint instance to be hidden until it is ready, just add this component to the entity. +This can be particularly usefull in at least two use cases: +- when spawning levels +- when spawning bluprint instances that contain **lights** at runtime: in previous versions I have noticed some very unpleasant "flashing" effect when spawning blueprints with lights, +this component avoids that issue + +## Hot reload + +if you have configured your Bevy project to use hot reload you will automatically get hot reloading of levels & blueprints + +## Improved animation handling + +- sceneAnimations +- animationTriggers + +## Completely restructured blueprint spawning process + + +Additionally +- you do not really need to worry about SystemSets anymore diff --git a/README-workflow-ui.md b/README-workflow-ui.md index 268bb1d..c6e0c51 100644 --- a/README-workflow-ui.md +++ b/README-workflow-ui.md @@ -4,11 +4,11 @@ The workflow goes as follows (once you got your Bevy code setup) ## Bevy side - create & register all your components you want to be able to set from the Blender side (this is basic Bevy, no specific work needed) -- follow the instructions in the [bevy_registry_export](./crates/bevy_registry_export/) to generate a registry export +- follow the instructions in the [blenvy](./crates/blenvy/) to generate a registry export ## Component creation -Setup the Blender [bevy_components](./tools/bevy_components/README.md) add-on +Setup the Blender [Blenvy](./tools/blenvy/README.md) blender add-on to add & edit your components visually & reliably ![bevy_components](./docs/bevy_components.png) @@ -22,7 +22,7 @@ to add & edit your components visually & reliably - custom properties - cameras & lights if you want a complete level (as in this example) ![gltf_export](./docs/gltf_export.png) - - or much better, using [gltf_auto_export](./tools/gltf_auto_export/) + - or much better, using [blenvy](./tools/blenvy/) ## Now use your gltf files in Bevy diff --git a/README.md b/README.md index c044000..8c5f0db 100644 --- a/README.md +++ b/README.md @@ -2,107 +2,86 @@ [![License](https://img.shields.io/crates/l/bevy_gltf_components)](https://github.com/kaosat-dev/Blender_bevy_components_workflow/blob/main/LICENSE.md) [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F5TO32O) -# Blender_bevy_components_workflow +# BLENVY: a friendly Blender <=> Bevy workflow ! ![demo](./docs/blender_bevy.png) Crates & tools for adding components from gltf files in the [Bevy](https://bevyengine.org/) game engine. -It enables minimalistic [Blender](https://www.blender.org/) (gltf) centric workflow for Bevy, ie defining entites & their components -inside Blender using Blender's objects **custom properties**. -Aka "Blender as editor for Bevy" +It enables a [Blender](https://www.blender.org/) (gltf) centric workflow for Bevy, ie defining entites & their components +inside Blender. Aka "Blender as editor for Bevy" It also allows you to setup 'blueprints' in Blender by using collections (the recomended way to go most of the time), or directly on single use objects . ## Features -* Useful if you want to use Blender (or any editor allowing to export gltf with configurable gltf_extras) as your Editor -* define Bevy components as custom properties in Blender (some visually , some using RON, though an older JSON version is also available) -* no plugin or extra tools needed in Blender (but I provide a [little Blender add-on](./tools/gltf_auto_export/README.md) to auto-export to gltf on save (and more !) if you want !) -* now also with a nice UI tool to add & edit Bevy components in [Blender](./tools/bevy_components/README.md) -* define components in Blender Collections & override any of them in your collection instances if you want -* ability to automatically turn your Blender collections into [gltf Blueprints](./crates/bevy_gltf_blueprints/README.md) for reuse -* minimal setup & code, you can have something basic running fast +* Useful if you want to use Blender as your Editor +* define Bevy components as custom properties in Blender with an UI tool to add & edit Bevy components, automatically export gltf blueprints & more in [Blender](./tools/blenvy/README.md) +* blueprints & levels system : turn your Blender collections into [gltf Blueprints](./crates/blenvy/README.md) for reuse inside levels that are just Blender scenes +* setup & tweak components in Blender Collections & override any of them in your collection instances if you want +* setup & tweak components for objects, meshes and materials as well ! +* automatically load all assets for each blueprint (gltf files, manually added assets), with no setup required +* hot reload of your levels & blueprints +* minimal setup & code, you can have something basic running fast * minimal dependencies: Bevy, Serde & Ron only ! * opensource +> If you were previously using the individual bevy_gltf_xxx crates & Blender add-ons please see the [migration guide](./Migration_guide.md) ## Crates -- [bevy_gltf_components](./crates/bevy_gltf_components/) This crate allows you to define components direclty inside gltf files and instanciate/inject the components on the Bevy side. +One crate to rule them all ! +- [blenvy](./crates/blenvy/) This crate allows you to + * define components direclty inside gltf files and instanciate/inject the components on the Bevy side. + * export your project's Bevy registry to json, in order to be able to generate custom component UIs on the Blender side in the Blender [blenvy](./tools/blenvy/README.md) add-on + * define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy. With the ability to override and add components when spawning, efficient "level" loading etc + * the ability to save & load your game state in a relatively simple way, by leveraging the blueprint functionality to only save a minimal subset of dynamic data, seperating dynamic & static parts of levels etc. + + OLD videos: There is a [video tutorial/explanation](https://youtu.be/-lcScjQCA3c) if you want, or you can read the crate docs. - The examples for the crate are [here](./examples/bevy_gltf_components/) - -- [bevy_gltf_blueprints](./crates/bevy_gltf_blueprints/) This crate adds the ability to define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy. With the ability to override and add components when spawning, efficient "level" loading etc - There is a [video tutorial/explanation](https://youtu.be/CgyNtwgYwdM) for this one too, or you can read the crate docs - The examples for the crate are [here](./examples/bevy_gltf_blueprints/) - > Note: this is the recomended crate to use and uses ```bevy_gltf_components``` under the hood -- [bevy_gltf_save_load](./crates/bevy_gltf_save_load/) This crate adds the ability to save & load your game state in a relatively simple way, by leveraging the blueprint functionality of -bevy_gltf_blueprints to only save a minimal subset of dynamic data, seperating dynamic & static parts of levels etc. -The examples for the crate are [here](./examples/bevy_gltf_save_load/) - > Note: this uses ```bevy_gltf_blueprints``` under the hood - -- [bevy_registry_export](./crates/bevy_registry_export/) This crate adds the ability to export your project's Bevy registry to json, in order to be able to generate custom component UIs on the Blender side in the Blender [bevy_components](./tools/bevy_components/README.md) add-on - + The examples for the crate are [here](./examples/blenvy/) ## Tools -### Blender: gltf_auto_export - -- for convenience I also added a [Blender addon](./tools/gltf_auto_export/README.md) that automatically exports your level/world from Blender to gltf whenever you save your Blend file -- it also supports automatical exports of collections as [Gltf blueprints](./crates/bevy_gltf_blueprints/README.md) & more ! - -Please read the [README]((./tools/gltf_auto_export/README.md)) of the add-on for installation & use instructions - -### Blender: bevy_components - -- an add-on for Blender to allow easilly adding & editing Bevy components , using automatically generated UIs for each component - -Please read the [README]((./tools/bevy_components/README.md)) of the add-on for installation & use instructions - +### Blender: blenvy +- an all in one [Blender addon](./tools/blenvy/README.md) for the Blender side of the workflow: + - allow easilly adding & editing Bevy components , using automatically generated UIs for each component + - automatically exports your level/world from Blender to gltf whenever you save your Blend file + - automatically export your [Gltf blueprints](./crates/blenvy/README.md) & assets ## Examples -you can find all examples, by crate as seperate crates for clearer dependencies in [here](./examples/) - -- [bevy_gltf_components](./examples/bevy_gltf_components/) - * [basic](./examples/bevy_gltf_components/basic/) use of ```bevy_gltf_components``` only, to spawn entities with components defined inside gltf files - -- [bevy_gltf_blueprints](./examples/bevy_gltf_blueprints/) - * [basic](./examples/bevy_gltf_blueprints/basic/) more advanced example : use of ```bevy_gltf_blueprints``` to spawn a level and then populate it with entities coming from different gltf files, live (at runtime) spawning of entities etc - * [animation](./examples/bevy_gltf_blueprints/animation/) how to use and trigger animations from gltf files (a feature of ```bevy_gltf_blueprints```) - * & lots more - -- [bevy_gltf_save_load](./examples/bevy_gltf_save_load/) - -- [bevy_registry_export](./examples/bevy_registry_export/) +you can find all examples, [here](./examples/blenvy) +* [components](./examples/blenvy/components/) use of ```components``` only, to spawn entities with components defined inside gltf files +* [blueprints](./examples/blenvy/blueprints/) use of ```blueprints``` and ```levels``` to spawn a level and then populate it with entities coming from different gltf files, live (at runtime) spawning of entities etc +* [animation](./examples/blenvy/animation/) how to use and trigger animations from gltf files +* [save_load](./examples/blenvy/save_load/) how to save & load levels +* [demo](./examples/demo/) a full demo showcasing all features , including physics, animation ## Workflow The workflow goes as follows (once you got your Bevy code setup) + - create & register all your components you want to be able to set from the Blender side (this is basic Bevy, no specific work needed) ![component registration](./docs/component_registration.png) -- then you have two options - - add your components to objects in Blender **manually** as **custom properties** : see [here](./README-workflow-classic.md) for more details - - add your components to objects in Blender **with a nice UI** see [here](./README-workflow-ui.md) for more details +- setup & then use the Blenvy [Bevy crate](./crates/blenvy/README.md) +- setup & then use the Blenvy [Blender add-on](./tools/blenvy/README.md) +- iterate +- have fun ! + +- then add your components to objects in Blender **with a nice UI** see [here](./README-workflow-ui.md) for more details ## Limitations / issues -- Some of `bevy_rapier`/physics code / ways to define colliders could perhaps be done better/visually within Blender (currently it also goes via RON) -## Future work -- I have a number of other tools/ code helpers that I have not yet included here, because they need cleanup/ might make this example too complex - -## Credits - -- somebody I cannot recall helped me originally with the gltf loading tracker in the Bevy Discord, so thanks ! And if it was you, please let me know so I can give credit where credit is due :) +- Some of `avian` or `bevy_rapier` /physics code / ways to define colliders could perhaps be done better/visually within Blender ## Contributors @@ -114,6 +93,7 @@ Thanks to all the contributors helping out with this project ! Big kudos to you, - [yukkop](https://github.com/yukkop) - [killercup](https://github.com/killercup) - [janhohenheim ](https://github.com/janhohenheim) +- [BUGO07](https://github.com/BUGO07) ## License diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 0000000..96c9c44 --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,36 @@ +This new release has a lot of breaking changes in the Blender tooling as well as in the Bevy crates +Here is a rundown + rationale behing the changes: + + +- Blender add-ons + - Auto_export: + - spliting out of gltf exporter settings + up until now , the auto export add-on provided a *subset* of gltf settings, causing issues due to lack of features (in particular for animation settings), + and it required me to play catch up every time there where added / changed settings + the Ui of Blender's gltf exporter is NOT reusable in any form or way inside another add-on . I tried various solutions such as turning the auto exporter + into a 'extension' of the standard exporter, but none of them worked in a reliable or 'nice to use' way + + So I decided to split the gltf settings from the auto_export setting, this has multiple advantages: + * access to ALL gltf settings + * the gltf UI & settings will always keep up with the official releases + * less maintenance work + + The only disadvantage is that the standard gltf exporter is a normal exporter, so it generates a 'fake' gltf file that immediatly gets deleted after export, + so you will need to use the new side panel to set your gltf settings: + * this is also done to ensure that the gltf settings settings used for auto export are NOT interfering with the ones you might use when exporting gltf files normally + + - change detection : + after spending MANY hours analysing the issues with change detection (using some of Blender's built in logic) I came to the conclusion that it was not going to be reliable enough, so I opted for a 'hand made' brute force approach to change detection: + * every time you save (& thus export), all your scenes are serialized / hashed and that hashed version is compared to the one from the last save to determine what changed and what did not + + - handling of external/ embeded / split etc collections + while adding tests I also realised that the detection of which main scenes & blueprints that needed to be exported was faulty, so I rewrote all the code in charge of that : this means that in general , based on your settings, the add-on will more accuratly export only those levels/blueprints that really NEED to be exported + + - improved handling of multi-blend file projects + Up until now, all export paths where relative ** to the blend file itself** which could lead to issues when working with multiple blend files + Also for future improvements regarding assets managment, I changed the export paths to be relative to a new "project root" folder which is your *Bevy project's root folder* + - the levels/worlds now also got a seperate setting so you can easilly set where to export them too (they are not dumped out into the main export folder anymore), giving you more control over your non blueprint exports + + - bevy_components + Up until now , it was not possible to have multiple components with the same name (ie ) as all the logic was based on short names + This required completely changing HOW/WHERE components are stored in objects, and they are now stored inside a 'bevy_components' custom property \ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..c2d032c --- /dev/null +++ b/TODO.md @@ -0,0 +1,319 @@ +Auto export + - [x] the original blueprints & levels path are now left as is, and there is an auto injection of xxxpath_full for absolute paths + - [x] replace all uses of the paths with the correct ones above + - [x] levels + - [x] blueprints + - [x] materials + - [x] move out the UI for "assets" folder out of "blueprints condition" + - [x] fix asset path calculations + - root path => relative to blend file path + - asset path => relative to root path + - blueprints/levels/blueprints path => relative to assets path + - [ ] add error handling for de/serialization of project, so that in case of error, the previous saved serialized project is thrown away + +- move out some parameters from auto export to a higher level (as they are now used in multiple places) + - [x] main/ library scene names + - [x] paths + +- [x] Data storage for custom properties: + - for scenes (main scenes) + - at scene level + - for blueprints + - at collection level + - Note: these should be COPIED to the scene level when exporting, into the temp_scene's properties + + > NOTE: UP until we manage to create a PR for Bevy to directly support the scene level gltf_extras, the auto exporter should automatically create (& remove) + any additional object with scene__components to copy that data to + +Assets: + - blueprint assets should be auto_generated & inserted into the list of assets : these assets are NOT removable by the user + - should not change the list of manually added assets + - [x] store assets + - [x] per main scene for level/world assets + - [x] per blueprint for blueprint in lib scene + - [x] UI: + - [x] we need to display all direct assets (stored in the scene) + - [ ] indirect assets: + - QUESTION : do we want to include them in the list of assets per level ? + - this would enable pre-loading ALL the assets, but is not ideal in most other cases + - so add an option ? + - [x] the assets of local blueprints + +Blueprints: + - [x] on save: write IN THE COLLECTION PROPERTIES + - list of assets + - export path + - [x] blueprint selection for nested blueprints is broken + + - [ ] scan & inject on load + - [ ] scan & inject on save + - [ ] decide where & when to do & store blueprints data + +Components: + - [x] add support for adding components to collections + - [x] upgrade all operators: + - [x] add + - [x] remove + - [x] copy & paste + - [x] BLENVY_OT_component_rename_component + - [x] BLENVY_OT_component_fix + - [x] add handling for core::ops::Range & other ranges + - [x] fix is_component_valid that is used in blenvy + - [x] Hashmap Support + - [x] fix parsing of keys's type either on Bevy side (prefered) or on the Blender side + - [x] fix weird issue with missing "0" property when adding new entry in empty hashmap => happens only if the values for the "setter" have never been set + - [ ] handle missing types in registry for keys & values + - [x] adding a hashmap nukes every existing component ?? + - [x] Add correct upgrade handling from individual component to bevy_components + - [x] Settings handling: + - [x] move saveable settings out to a settings file + - [x] update save & load + - [x] add handling of polling frequency & enabling + - [x] move advanced tools to components tab + - [x] remove most of the (bulk) advanced tools, too complex, too unclear (even for me !) and of limited use + - component renaming should be kept, but perhaps simplified: + - if a renaming fails because the parameters are incompatible, nuke the old parameters + - perhaps just add a display list of all NON component custom properties, so the user can find them easilly ? + - [x] status "unregistered" is often false and misleading + -> see in registry ui "for custom_property in object.keys():" + - [x] overhaul / improve the component selector (with built in searching, etc) + - [x] remove select_component_name_to_replace + - [x] display of invalid components is not working ? + - [x] weird items are present in the components list that do not seem to be components + - [x] remove : + - BLENVY_OT_component_list_add_item + - BLENVY_OT_component_list_remove_item + - BLENVY_OT_component_list_select_item: merge it into the rest of the actions + - [x] clearing invalid flag after a registry change does not work correctly (ie the ui still says the component is invalid) + - [x] should reset ALL "invalid" flags IF they have the matching data + - [x] registry auto reload not working ? + - [x] changing the registry breaks all the values of existing components !!!!!! + -> VERY likely due to the int-offset computation for hashes of components + - now switched to tiger_hash + - [x] add warning about hash colision (not much we can/ could do if it is the case ?) + - [x] double check weird collisions AND/OR reuse existing if applicable + - [x] annoying default path for registry, should be relative to the assets path + + +General things to solve: + - [x] save settings + - [x] load settings + - [x] add blueprints data + +- [x] rename all path stuff using the old naming convention : "blueprints_path_full" +- [x] generate the full paths directly when setting them in the UI + - [x] problem : how to deal with defaults: do it on start/load ? +- [x] filter out scenes that have already been used in scenes list + +General issues: + - there is no safeguard for naming collisions for naming across blender files + - this can cause an issue for assets list "parent" + - "parents" can only be blueprints + - they normally need/have unique export paths (otherwise, user error, perhaps show it ?) + - perhaps a simple hashing of the parent's path would be enought + + - [x] addon-prefs => settings + - [x] generate_gltf_export_settings => should not use add-on prefs at all ? since we are not overriding gltf settings that way anymore ? + - [x] remove hard coded path for standard gltf settings + - [x] load settings on file load + - [x] auto_export + - [x] components + - [x] add handling of errors when trying to load settings + +- [x] fix auto export workflow +- [x] add hashing of modifiers/ geometry nodes in serialize scene +- [x] add ability to FORCE export specific blueprints & levels +- [x] change scene selector to work on actual scenes aka to deal with renamed scenes + - [x] remove get_main_and_library_scenes as it should not be needed anymore +- [x] fix asset file selection +- [x] change "assets" tab to "levels"/worlds tab & modify UI accordingly +- [x] remove local assets, useless +- [x] remove 'export_marked_assets' it should be a default setting +- [x] disable/ hide asset editing ui for external assets +- [x] fix level asets UI +- [x] remove BlueprintsList & replace is with assets list +- [x] switch to bevy 0.14 rc2 +- [x] trigger events when assets are loaded, blueprints are spawned & co +- [x] overall cleanup + - [x] object.add_bevy_component => blenvy.component_add + +Blender side: +- [x] force overwrite of settings files instead of partial updates ? +- [x] prevent loop when loading/setting/saving settings +- [x] fix asset changes not being detected as a scene change +- [x] fix scene setting changes not being detected as a scene change +- [x] add back lighting_components +- [x] check if scene components are being deleted through our scene re-orgs in the spawn post process +- [x] fix unreliable project hashing between sessions: (note, it is due to the use of hash() : https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions) +- [x] figure out why there are still changes per session (it is due to object pointer being present in the generated "hash") + - materials & modifiers, both using the same underlying logic + - [x] filter out components_meta + - [x] filter out xxx_ui propgroups +- [x] fix missing main/lib scene names in blenvy_common_settings +- [x] fix incorect updating of main/lib scenes list in settings +- [ ] add handling of scene renames + - [x] store (on load) a mapping of scene objects to scene names + - [x] on save, calculate another mapping of scene objects to scene names + - if there is a mismatch between the stored version & the new version for a given scene, it has been renamed ! + - [x] pass this information to scene diffing to remap old/new scene names + - [ ] move the rename detection to AFTER scene serialization, otherwise we could have a naming mistmatch + - weird behaviour, perhaps find another way , ie for example replace scene name in saved previous data + - is post save causing the issue ? review +- [x] investigate weird issue of changes detected to all after a reload + +- [x] should we write the previous _xxx data only AFTER a sucessfull export only ? +- [x] finer grained control of setting changes to trigger a re-export: + - [x] common: any of them should trigger + - [x] components: none + - [x] auto_export: + - auto_export: yes + - gltf settings: yes + - change detection: no ? + - export blueprints: YES + - export split dynamic/static: YES + - export merge mode : YES + - materials: YES +- [x] blenvy tooling not appearing in library scenes ?? (edit: was actually , it was not appearing in anything but object mode) +- [x] find a solution for the new color handling + - [x] in theory, srgba, linearrgba , and hsva should be able to be represented visually + - [x] bevy_render::color::Color => bevy_color::color::Color +- [x] fix weird issue with hashmaps with enums as values +- [x] prevent attempting to add unexisting components to targets (ie when using the component search) + - [x] also for the bulk fix actions +- [x] selection of nested objects in collections IS NOT WORKING !!! AHH +- [x] fix/ overhaul upgreadable components + - [x] add listing of upgradeable components for + - [x] meshes + - [x] materials + - [x] fix display of upgradeaeble components & co + - [x] add clear visual distinction between internal (selectable) & non selectable ones + - [x] do not make selection button available for external blueprints/collections + - [x] perhaps do not show the other buttons & inputs either ? we cannot change the values of an external library file anyway + +- [x] BLENVY_OT_item_select is missing handling for the other types (outside of object & collection) + - [x] fix selection logic +- [x] update testing blend files +- [x] disable 'export_hierarchy_full_collections' for all cases: not reliable and redudant +- [x] fix systematic material exports despite no changes +- [x] investigate lack of detection of changes of adding/changing components + - [x] change scene serialization to account for collections ...sigh + - [x] also add one NOT PER scene for materials, to fix the above issue with materials + - [x] move material caching into hash material +- [x] also remove ____dummy____.bin when export format is gltf + +- [ ] fix/cleanup asset information injection (also needed for hot reload) + - [ ] add back per blueprint assets + - [ ] reuse the already existing asset_scan + export thing + - thoughts: + - the "list of all assets" is actually the "fake"/generated one: nobody would write a list of assets for sub assets, + you would just add the assets to your blueprint + - in Bevy at spawning we have + blueprint => assets + for hot reload we need + asset => blueprint instances so we can despawn/respawn etc blueprint instances when one of their assets has changed + + problem of untyped vs typed + perhaps have a mapping of untyped => typed id + map asset id => [entity ids] + +- [ ] add option to 'split out' meshes from blueprints ? + - [ ] ie considering meshletts etc , it would make sense to keep blueprints seperate from purely mesh gltfs +- [ ] persist exported materials path in blueprints so that it can be read from library file users + - [ ] just like "export_path" write it into each blueprint's collection + - [ ] scan for used materials per blueprint ! + - [ ] for scenes, scan for used materials of all non instance objects (TODO: what about overrides ?) + +- [ ] add a way of visualizing per blueprint instances ? +- [ ] display export path of blueprints (mostly external) ? +- [ ] hidden objects/collections only semi respected at export + - this is because blueprints are external ? + - [ ] verify based on gltf settings + - [ ] add "Visibility::Hidden" component otherwise + https://devtalk.blender.org/t/how-to-get-render-visibility-for-object/23717 + +- [ ] inject_export_path_into_internal_blueprints should be called on every asset/blueprint scan !! Not just on export +- [ ] undo after a save removes any saved "serialized scene" data ? DIG into this +- [ ] add tests for + - [ ] disabled components + - [ ] blueprint instances as children of blueprint instances + - [ ] blueprint instances as children of empties + +- [x] check/ fix behaviour of blender plugin if all folders are the same (ie, all in assets for example) +- [x] rename all "main scene xx" to "level scene" +- [x] make sure the "add scene" button is not available unless you have actually selected one +- [x] make auto export be on by default, however bail out early by detecting if there are any level/blueprint scenes + +Bevy Side: +- [x] deprecate BlueprintName & BlueprintPath & use BlueprintInfo instead +- [x] make blueprint instances invisible until spawning is done to avoid "spawn flash"? + - [x] make this controlable via an additional "HideUntilReady" component + - [x] register "HideUntilReady" so users can set this on their blueprints in Blender directly +- [x] restructure blueprint spawning + - [x] "blueprint ready" only be triggered after all its sub blueprints are ready + - [x] "blueprintInstance ready"/finished + BlueprintAssetsLoaded + BlueprintSceneSpawned + BlueprintChildrenReady + BlueprintReadyForPostProcess + - [x] fix issues with deeply nested blueprints + - perhaps reverse logic by using iter_ascendants + - [x] fix materials handling + - [ ] fix animations handling + - [x] fix/upgrade blueprint level animations + - [x] fix/upgrade scene level animations + - [ ] rename SceneAnimations to LevelAnimations (more coherent with the rest) + - [ ] add back & cleanup animation frame triggers + - [x] move sub blueprint handling to blueprints_finalize_instances +- [x] look into component overriding , it seems broken: + - [x] blueprint level/ collection level components are now visible in instances in Blender + - [x] they do not seem to be transfered to the (instance) entity above: + could they be on the "empty node" ? + +- [ ] simplify testing example: + - [x] remove use of rapier physics (or even the whole common boilerplate ?) + - [ ] remove/replace bevy editor pls with some native ui to display hierarchies + - [ ] a full fledged demo (including physics & co) + - [ ] other examples without interactions or physics + +- [ ] add hot reloading + - [x] basics + - [x] make it enabled/disabled based on general flag + - [x] account for changes impact both parent & children (ie "world" and "blueprint3") for example, which leads to a crash as there is double despawn /respawn so we need to filter things out + - [x] if there are many assets/blueprints that have changed at the same time, it causes issues similar to the above, so apply a similar fix + - [x] also ignore any entities currently spawning (better to loose some information, than cause a crash) + - [x] for sub blueprint tracking: do not propagate/ deal with parent blueprints if they are not themselves Spawning (ie filter out by "BlueprintSpawning") + - [x] cleanup internals + - [ ] analyse what is off with blueprint level components + - [ ] add the root blueprint itself to the assets either on the blender side or on the bevy side programatically + - [ ] invalidate despawned entity & parent entities AABB + - [ ] add unloading/cache removal of materials + +- [ ] add back and upgrade save-load + +- [x] review & change general component insertion & spawning ordering & logic + - GltfComponentsSet::Injection => GltfBlueprintsSet::Spawn => GltfBlueprintsSet::AfterSpawn + Injection => inject lights & co => spawn => afterSpawn + => Injection => inject lights & co + +- [ ] add a way of overriding assets for collection instances => doubt this is possible +- [ ] cleanup all the spurious debug messages +- [x] fix animation handling + - [x] how to deal with animation graphs ? + + +- [x] remove "Library" component & co +- [x] make "InBlueprint" non optional, +- [x] and perhaps rename it to "FromBlueprint" +- [ ] perhaps change it to FromBlueprint(BlueprintInfo) + +- [x] BlueprintInstanceDisabled => BlueprintInstanceDisabled +- [x] fix "remove component" operator from the rename/fix/update components panel +- [ ] replace string in BlueprintInfo path with PathBuf ? + +- [ ] update main docs + - [x] rename project to Blenvy + - [ ] replace all references to the old 2 add-ons with those to Blenvy +- [x] rename repo to "Blenvy" +- [x] do a deprecation release of all bevy_gltf_xxx crates to point at the new Blenvy crate + +clear && pytest -svv --blender-template ../../testing/bevy_example/art/testing_library.blend --blender-executable /home/ckaos/tools/blender/blender-4.1.0-linux-x64/blender tests/test_bevy_integration_prepare.py && pytest -svv --blender-executable /home/ckaos/tools/blender/blender-4.1.0-linux-x64/blender tests/test_bevy_integration.py \ No newline at end of file diff --git a/crates/bevy_gltf_blueprints/Cargo.toml b/crates/bevy_gltf_blueprints/Cargo.toml deleted file mode 100644 index 5ca181c..0000000 --- a/crates/bevy_gltf_blueprints/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "bevy_gltf_blueprints" -version = "0.11.0" -authors = ["Mark 'kaosat-dev' Moissette"] -description = "Adds the ability to define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy." -homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -repository = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -keywords = ["gamedev", "bevy", "gltf", "blueprint", "prefab"] -categories = ["game-development"] -edition = "2021" -license = "MIT OR Apache-2.0" - -[lints] -workspace = true - -[dependencies] -bevy_gltf_components = { version = "0.6", path = "../bevy_gltf_components" } -bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] } - -[dev-dependencies] -bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/bevy_gltf_blueprints/LICENSE_MIT.md b/crates/bevy_gltf_blueprints/LICENSE_MIT.md deleted file mode 100644 index f8b9094..0000000 --- a/crates/bevy_gltf_blueprints/LICENSE_MIT.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Mark "kaosat-dev" Moissette - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/crates/bevy_gltf_blueprints/src/animation.rs b/crates/bevy_gltf_blueprints/src/animation.rs deleted file mode 100644 index 4f2d652..0000000 --- a/crates/bevy_gltf_blueprints/src/animation.rs +++ /dev/null @@ -1,18 +0,0 @@ -use bevy::prelude::*; -use bevy::utils::HashMap; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// storage for animations for a given entity (hierarchy), essentially a clone of gltf's `named_animations` -pub struct Animations { - pub named_animations: HashMap>, - pub named_indices: HashMap, - pub graph: Handle, -} - -#[derive(Component, Debug)] -/// Stop gap helper component : this is inserted into a "root" entity (an entity representing a whole gltf file) -/// so that the root entity knows which of its children contains an actualy `AnimationPlayer` component -/// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down" -/// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid -pub struct AnimationPlayerLink(pub Entity); diff --git a/crates/bevy_gltf_blueprints/src/lib.rs b/crates/bevy_gltf_blueprints/src/lib.rs deleted file mode 100644 index db9181f..0000000 --- a/crates/bevy_gltf_blueprints/src/lib.rs +++ /dev/null @@ -1,179 +0,0 @@ -pub mod spawn_from_blueprints; -pub use spawn_from_blueprints::*; - -pub mod spawn_post_process; -pub(crate) use spawn_post_process::*; - -pub mod animation; -pub use animation::*; - -pub mod aabb; -pub use aabb::*; - -pub mod materials; -pub use materials::*; - -pub mod copy_components; -pub use copy_components::*; - -use core::fmt; -use std::path::PathBuf; - -use bevy::{ - prelude::*, - render::{primitives::Aabb, view::VisibilitySystems}, - utils::HashMap, -}; -use bevy_gltf_components::{ComponentsFromGltfPlugin, GltfComponentsSet}; - -#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] -/// set for the two stages of blueprint based spawning : -pub enum GltfBlueprintsSet { - Spawn, - AfterSpawn, -} - -#[derive(Bundle)] -pub struct BluePrintBundle { - pub blueprint: BlueprintName, - pub spawn_here: SpawnHere, -} -impl Default for BluePrintBundle { - fn default() -> Self { - BluePrintBundle { - blueprint: BlueprintName("default".into()), - spawn_here: SpawnHere, - } - } -} - -#[derive(Clone, Resource)] -pub struct BluePrintsConfig { - pub(crate) format: GltfFormat, - pub(crate) library_folder: PathBuf, - pub(crate) aabbs: bool, - pub(crate) aabb_cache: HashMap, // cache for aabbs - - pub(crate) material_library: bool, - pub(crate) material_library_folder: PathBuf, - pub(crate) material_library_cache: HashMap>, -} - -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Default)] -pub enum GltfFormat { - #[default] - GLB, - GLTF, -} - -impl fmt::Display for GltfFormat { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - GltfFormat::GLB => { - write!(f, "glb",) - } - GltfFormat::GLTF => { - write!(f, "gltf") - } - } - } -} - -#[derive(Debug, Clone)] -/// Plugin for gltf blueprints -pub struct BlueprintsPlugin { - pub legacy_mode: bool, // flag that gets passed on to bevy_gltf_components - - pub format: GltfFormat, - /// The base folder where library/blueprints assets are loaded from, relative to the executable. - pub library_folder: PathBuf, - /// Automatically generate aabbs for the blueprints root objects - pub aabbs: bool, - pub material_library: bool, - pub material_library_folder: PathBuf, -} - -impl Default for BlueprintsPlugin { - fn default() -> Self { - Self { - legacy_mode: true, - format: GltfFormat::GLB, - library_folder: PathBuf::from("models/library"), - aabbs: false, - material_library: false, - material_library_folder: PathBuf::from("materials"), - } - } -} - -fn aabbs_enabled(blueprints_config: Res) -> bool { - blueprints_config.aabbs -} - -fn materials_library_enabled(blueprints_config: Res) -> bool { - blueprints_config.material_library -} - -impl Plugin for BlueprintsPlugin { - fn build(&self, app: &mut App) { - app.add_plugins(ComponentsFromGltfPlugin { - legacy_mode: self.legacy_mode, - }) - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::>() - .register_type::>>() - .insert_resource(BluePrintsConfig { - format: self.format, - library_folder: self.library_folder.clone(), - - aabbs: self.aabbs, - aabb_cache: HashMap::new(), - - material_library: self.material_library, - material_library_folder: self.material_library_folder.clone(), - material_library_cache: HashMap::new(), - }) - .configure_sets( - Update, - (GltfBlueprintsSet::Spawn, GltfBlueprintsSet::AfterSpawn) - .chain() - .after(GltfComponentsSet::Injection), - ) - .add_systems( - Update, - ( - ( - prepare_blueprints, - check_for_loaded, - spawn_from_blueprints, - apply_deferred, - ) - .chain(), - (compute_scene_aabbs, apply_deferred) - .chain() - .run_if(aabbs_enabled), - apply_deferred, - ( - materials_inject, - check_for_material_loaded, - materials_inject2, - ) - .chain() - .run_if(materials_library_enabled), - ) - .chain() - .in_set(GltfBlueprintsSet::Spawn), - ) - .add_systems( - PostUpdate, - (spawned_blueprint_post_process, apply_deferred) - .chain() - .in_set(GltfBlueprintsSet::AfterSpawn) - .before(VisibilitySystems::CheckVisibility), - ); - } -} diff --git a/crates/bevy_gltf_blueprints/src/materials.rs b/crates/bevy_gltf_blueprints/src/materials.rs deleted file mode 100644 index f942331..0000000 --- a/crates/bevy_gltf_blueprints/src/materials.rs +++ /dev/null @@ -1,201 +0,0 @@ -use std::path::Path; - -use bevy::{ - asset::{AssetServer, Assets, Handle}, - ecs::{ - component::Component, - entity::Entity, - query::{Added, With}, - reflect::ReflectComponent, - system::{Commands, Query, Res, ResMut}, - }, - gltf::Gltf, - hierarchy::{Children, Parent}, - log::debug, - pbr::StandardMaterial, - reflect::Reflect, - render::mesh::Mesh, -}; - -use crate::{AssetLoadTracker, AssetsToLoad, BluePrintsConfig}; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// struct containing the name & source of the material to apply -pub struct MaterialInfo { - pub name: String, - pub source: String, -} - -/// flag component -#[derive(Component)] -pub(crate) struct BlueprintMaterialAssetsLoaded; -/// flag component -#[derive(Component)] -pub(crate) struct BlueprintMaterialAssetsNotLoaded; - -/// system that injects / replaces materials from material library -pub(crate) fn materials_inject( - blueprints_config: ResMut, - material_infos: Query<(Entity, &MaterialInfo), Added>, - asset_server: Res, - mut commands: Commands, -) { - for (entity, material_info) in material_infos.iter() { - let model_file_name = format!( - "{}_materials_library.{}", - &material_info.source, &blueprints_config.format - ); - let materials_path = Path::new(&blueprints_config.material_library_folder) - .join(Path::new(model_file_name.as_str())); - let material_name = &material_info.name; - let material_full_path = materials_path.to_str().unwrap().to_string() + "#" + material_name; // TODO: yikes, cleanup - - if blueprints_config - .material_library_cache - .contains_key(&material_full_path) - { - debug!("material is cached, retrieving"); - blueprints_config - .material_library_cache - .get(&material_full_path) - .expect("we should have the material available"); - commands - .entity(entity) - .insert(BlueprintMaterialAssetsLoaded); - } else { - let material_file_handle: Handle = asset_server.load(materials_path.clone()); - let material_file_id = material_file_handle.id(); - let asset_infos: Vec> = vec![AssetLoadTracker { - name: material_full_path, - id: material_file_id, - loaded: false, - handle: material_file_handle.clone(), - }]; - - commands - .entity(entity) - .insert(AssetsToLoad { - all_loaded: false, - asset_infos, - ..Default::default() - }) - .insert(BlueprintMaterialAssetsNotLoaded); - /**/ - } - } -} - -// TODO, merge with check_for_loaded, make generic ? -pub(crate) fn check_for_material_loaded( - mut blueprint_assets_to_load: Query< - (Entity, &mut AssetsToLoad), - With, - >, - asset_server: Res, - mut commands: Commands, -) { - for (entity, mut assets_to_load) in blueprint_assets_to_load.iter_mut() { - let mut all_loaded = true; - let mut loaded_amount = 0; - let total = assets_to_load.asset_infos.len(); - for tracker in assets_to_load.asset_infos.iter_mut() { - let asset_id = tracker.id; - let loaded = asset_server.is_loaded_with_dependencies(asset_id); - tracker.loaded = loaded; - if loaded { - loaded_amount += 1; - } else { - all_loaded = false; - } - } - let progress: f32 = loaded_amount as f32 / total as f32; - assets_to_load.progress = progress; - - if all_loaded { - assets_to_load.all_loaded = true; - commands - .entity(entity) - .insert(BlueprintMaterialAssetsLoaded) - .remove::(); - } - } -} - -/// system that injects / replaces materials from material library -pub(crate) fn materials_inject2( - mut blueprints_config: ResMut, - material_infos: Query< - (&MaterialInfo, &Children), - ( - Added, - With, - ), - >, - with_materials_and_meshes: Query< - (), - ( - With, - With>, - With>, - ), - >, - assets_gltf: Res>, - asset_server: Res, - - mut commands: Commands, -) { - for (material_info, children) in material_infos.iter() { - let model_file_name = format!( - "{}_materials_library.{}", - &material_info.source, &blueprints_config.format - ); - let materials_path = Path::new(&blueprints_config.material_library_folder) - .join(Path::new(model_file_name.as_str())); - let material_name = &material_info.name; - - let material_full_path = materials_path.to_str().unwrap().to_string() + "#" + material_name; // TODO: yikes, cleanup - let mut material_found: Option<&Handle> = None; - - if blueprints_config - .material_library_cache - .contains_key(&material_full_path) - { - debug!("material is cached, retrieving"); - let material = blueprints_config - .material_library_cache - .get(&material_full_path) - .expect("we should have the material available"); - material_found = Some(material); - } else { - let model_handle: Handle = asset_server.load(materials_path.clone()); // FIXME: kinda weird now - let mat_gltf = assets_gltf - .get(model_handle.id()) - .expect("material should have been preloaded"); - if mat_gltf.named_materials.contains_key(material_name as &str) { - let material = mat_gltf - .named_materials - .get(material_name as &str) - .expect("this material should have been loaded"); - blueprints_config - .material_library_cache - .insert(material_full_path, material.clone()); - material_found = Some(material); - } - } - - if let Some(material) = material_found { - for child in children.iter() { - if with_materials_and_meshes.contains(*child) { - debug!( - "injecting material {}, path: {:?}", - material_name, - materials_path.clone() - ); - - commands.entity(*child).insert(material.clone()); - } - } - } - } -} diff --git a/crates/bevy_gltf_blueprints/src/spawn_from_blueprints.rs b/crates/bevy_gltf_blueprints/src/spawn_from_blueprints.rs deleted file mode 100644 index 8c2a94d..0000000 --- a/crates/bevy_gltf_blueprints/src/spawn_from_blueprints.rs +++ /dev/null @@ -1,312 +0,0 @@ -use std::path::{Path, PathBuf}; - -use bevy::{gltf::Gltf, prelude::*, utils::HashMap}; - -use crate::{Animations, BluePrintsConfig}; - -/// this is a flag component for our levels/game world -#[derive(Component)] -pub struct GameWorldTag; - -/// Main component for the blueprints -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct BlueprintName(pub String); - -/// flag component needed to signify the intent to spawn a Blueprint -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct SpawnHere; - -#[derive(Component)] -/// flag component for dynamically spawned scenes -pub struct Spawned; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// flag component marking any spwaned child of blueprints ..unless the original entity was marked with the `NoInBlueprint` marker component -pub struct InBlueprint; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// flag component preventing any spawned child of blueprints to be marked with the `InBlueprint` component -pub struct NoInBlueprint; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -// this allows overriding the default library path for a given entity/blueprint -pub struct Library(pub PathBuf); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// flag component to force adding newly spawned entity as child of game world -pub struct AddToGameWorld; - -#[derive(Component)] -/// helper component, just to transfer child data -pub(crate) struct OriginalChildren(pub Vec); - -/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct BlueprintsList(pub HashMap>); - -/// helper component, for tracking loaded assets's loading state, id , handle etc -#[derive(Default, Debug)] -pub(crate) struct AssetLoadTracker { - #[allow(dead_code)] - pub name: String, - pub id: AssetId, - pub loaded: bool, - #[allow(dead_code)] - pub handle: Handle, -} - -/// helper component, for tracking loaded assets -#[derive(Component, Debug)] -pub(crate) struct AssetsToLoad { - pub all_loaded: bool, - pub asset_infos: Vec>, - pub progress: f32, -} -impl Default for AssetsToLoad { - fn default() -> Self { - Self { - all_loaded: Default::default(), - asset_infos: Default::default(), - progress: Default::default(), - } - } -} - -/// flag component, usually added when a blueprint is loaded -#[derive(Component)] -pub(crate) struct BlueprintAssetsLoaded; -/// flag component -#[derive(Component)] -pub(crate) struct BlueprintAssetsNotLoaded; - -/// spawning prepare function, -/// * also takes into account the already exisiting "override" components, ie "override components" > components from blueprint -pub(crate) fn prepare_blueprints( - spawn_placeholders: Query< - ( - Entity, - &BlueprintName, - Option<&Parent>, - Option<&Library>, - Option<&Name>, - Option<&BlueprintsList>, - ), - (Added, Added, Without), - >, - - mut commands: Commands, - asset_server: Res, - blueprints_config: Res, -) { - for (entity, blupeprint_name, original_parent, library_override, name, blueprints_list) in - spawn_placeholders.iter() - { - debug!( - "requesting to spawn {:?} for entity {:?}, id: {:?}, parent:{:?}", - blupeprint_name.0, name, entity, original_parent - ); - - // println!("main model path {:?}", model_path); - if blueprints_list.is_some() { - let blueprints_list = blueprints_list.unwrap(); - // println!("blueprints list {:?}", blueprints_list.0.keys()); - let mut asset_infos: Vec> = vec![]; - let library_path = - library_override.map_or_else(|| &blueprints_config.library_folder, |l| &l.0); - for (blueprint_name, _) in blueprints_list.0.iter() { - let model_file_name = format!("{}.{}", &blueprint_name, &blueprints_config.format); - let model_path = Path::new(&library_path).join(Path::new(model_file_name.as_str())); - - let model_handle: Handle = asset_server.load(model_path.clone()); - let model_id = model_handle.id(); - let loaded = asset_server.is_loaded_with_dependencies(model_id); - if !loaded { - asset_infos.push(AssetLoadTracker { - name: model_path.to_string_lossy().into(), - id: model_id, - loaded: false, - handle: model_handle.clone(), - }); - } - } - // if not all assets are already loaded, inject a component to signal that we need them to be loaded - if !asset_infos.is_empty() { - commands - .entity(entity) - .insert(AssetsToLoad { - all_loaded: false, - asset_infos, - ..Default::default() - }) - .insert(BlueprintAssetsNotLoaded); - } else { - commands.entity(entity).insert(BlueprintAssetsLoaded); - } - } else { - // in case there are no blueprintsList, we revert back to the old behaviour - commands.entity(entity).insert(BlueprintAssetsLoaded); - } - } -} - -pub(crate) fn check_for_loaded( - mut blueprint_assets_to_load: Query< - (Entity, &mut AssetsToLoad), - With, - >, - asset_server: Res, - mut commands: Commands, -) { - for (entity, mut assets_to_load) in blueprint_assets_to_load.iter_mut() { - let mut all_loaded = true; - let mut loaded_amount = 0; - let total = assets_to_load.asset_infos.len(); - for tracker in assets_to_load.asset_infos.iter_mut() { - let asset_id = tracker.id; - let loaded = asset_server.is_loaded_with_dependencies(asset_id); - tracker.loaded = loaded; - if loaded { - loaded_amount += 1; - } else { - all_loaded = false; - } - } - let progress: f32 = loaded_amount as f32 / total as f32; - // println!("progress: {}",progress); - assets_to_load.progress = progress; - - if all_loaded { - assets_to_load.all_loaded = true; - commands - .entity(entity) - .insert(BlueprintAssetsLoaded) - .remove::(); - } - } -} - -#[allow(clippy::too_many_arguments)] -pub(crate) fn spawn_from_blueprints( - spawn_placeholders: Query< - ( - Entity, - &BlueprintName, - Option<&Transform>, - Option<&Parent>, - Option<&Library>, - Option<&AddToGameWorld>, - Option<&Name>, - ), - ( - With, - Added, - Without, - ), - >, - - mut commands: Commands, - mut game_world: Query>, - - assets_gltf: Res>, - mut graphs: ResMut>, - asset_server: Res, - blueprints_config: Res, - - children: Query<&Children>, -) { - for ( - entity, - blupeprint_name, - transform, - original_parent, - library_override, - add_to_world, - name, - ) in spawn_placeholders.iter() - { - debug!( - "attempting to spawn {:?} for entity {:?}, id: {:?}, parent:{:?}", - blupeprint_name.0, name, entity, original_parent - ); - - let what = &blupeprint_name.0; - let model_file_name = format!("{}.{}", &what, &blueprints_config.format); - - // library path is either defined at the plugin level or overriden by optional Library components - let library_path = - library_override.map_or_else(|| &blueprints_config.library_folder, |l| &l.0); - let model_path = Path::new(&library_path).join(Path::new(model_file_name.as_str())); - - // info!("attempting to spawn {:?}", model_path); - let model_handle: Handle = asset_server.load(model_path.clone()); // FIXME: kinda weird now - - let gltf = assets_gltf.get(&model_handle).unwrap_or_else(|| { - panic!( - "gltf file {:?} should have been loaded", - model_path.to_str() - ) - }); - - // WARNING we work under the assumtion that there is ONLY ONE named scene, and that the first one is the right one - let main_scene_name = gltf - .named_scenes - .keys() - .next() - .expect("there should be at least one named scene in the gltf file to spawn"); - - let scene = &gltf.named_scenes[main_scene_name]; - - // transforms are optional, but still deal with them correctly - let mut transforms: Transform = Transform::default(); - if transform.is_some() { - transforms = *transform.unwrap(); - } - - let mut original_children: Vec = vec![]; - if let Ok(c) = children.get(entity) { - for child in c.iter() { - original_children.push(*child); - } - } - - let mut graph = AnimationGraph::new(); - let mut named_animations: HashMap> = HashMap::new(); - let mut named_indices: HashMap = HashMap::new(); - - for (key, clip) in gltf.named_animations.iter() { - named_animations.insert(key.to_string(), clip.clone()); - let animation_index = graph.add_clip(clip.clone(), 1.0, graph.root); - named_indices.insert(key.to_string(), animation_index); - } - let graph = graphs.add(graph); - - commands.entity(entity).insert(( - SceneBundle { - scene: scene.clone(), - transform: transforms, - ..Default::default() - }, - Animations { - named_animations, - named_indices, - graph, - }, - Spawned, - OriginalChildren(original_children), - )); - - if add_to_world.is_some() { - let world = game_world - .get_single_mut() - .expect("there should be a game world present"); - commands.entity(world).add_child(entity); - } - } -} diff --git a/crates/bevy_gltf_blueprints/src/spawn_post_process.rs b/crates/bevy_gltf_blueprints/src/spawn_post_process.rs deleted file mode 100644 index b53f4d7..0000000 --- a/crates/bevy_gltf_blueprints/src/spawn_post_process.rs +++ /dev/null @@ -1,100 +0,0 @@ -use std::any::TypeId; - -use bevy::gltf::Gltf; -use bevy::prelude::*; -use bevy::scene::SceneInstance; -// use bevy::utils::hashbrown::HashSet; - -use super::{AnimationPlayerLink, Animations}; -use super::{SpawnHere, Spawned}; -use crate::{ - AssetsToLoad, BlueprintAssetsLoaded, CopyComponents, InBlueprint, NoInBlueprint, - OriginalChildren, -}; - -/// this system is in charge of doing any necessary post processing after a blueprint scene has been spawned -/// - it removes one level of useless nesting -/// - it copies the blueprint's root components to the entity it was spawned on (original entity) -/// - it copies the children of the blueprint scene into the original entity -/// - it add `AnimationLink` components so that animations can be controlled from the original entity -/// - it cleans up/ removes a few , by then uneeded components -pub(crate) fn spawned_blueprint_post_process( - unprocessed_entities: Query< - ( - Entity, - &Children, - &OriginalChildren, - &Animations, - Option<&NoInBlueprint>, - Option<&Name>, - ), - (With, With, With), - >, - added_animation_players: Query<(Entity, &Parent), Added>, - all_children: Query<&Children>, - - mut commands: Commands, -) { - for (original, children, original_children, animations, no_inblueprint, name) in - unprocessed_entities.iter() - { - debug!("post processing blueprint for entity {:?}", name); - - if children.len() == 0 { - warn!("timing issue ! no children found, please restart your bevy app (bug being investigated)"); - continue; - } - // the root node is the first & normally only child inside a scene, it is the one that has all relevant components - let mut root_entity = Entity::PLACEHOLDER; //FIXME: and what about childless ones ?? => should not be possible normally - // let diff = HashSet::from_iter(original_children.0).difference(HashSet::from_iter(children)); - // we find the first child that was not in the entity before (aka added during the scene spawning) - for c in children.iter() { - if !original_children.0.contains(c) { - root_entity = *c; - break; - } - } - - // we flag all children of the blueprint instance with 'InBlueprint' - // can be usefull to filter out anything that came from blueprints vs normal children - if no_inblueprint.is_none() { - for child in all_children.iter_descendants(root_entity) { - commands.entity(child).insert(InBlueprint); - } - } - - // copy components into from blueprint instance's root_entity to original entity - commands.add(CopyComponents { - source: root_entity, - destination: original, - exclude: vec![TypeId::of::(), TypeId::of::()], - stringent: false, - }); - - // we move all of children of the blueprint instance one level to the original entity - if let Ok(root_entity_children) = all_children.get(root_entity) { - for child in root_entity_children.iter() { - // info!("copying child {:?} upward from {:?} to {:?}", names.get(*child), root_entity, original); - commands.entity(original).add_child(*child); - } - } - - if animations.named_animations.keys().len() > 0 { - for (added, parent) in added_animation_players.iter() { - if parent.get() == root_entity { - // FIXME: stopgap solution: since we cannot use an AnimationPlayer at the root entity level - // and we cannot update animation clips so that the EntityPaths point to one level deeper, - // BUT we still want to have some marker/control at the root entity level, we add this - commands.entity(original).insert(AnimationPlayerLink(added)); - } - } - } - - commands.entity(original).remove::(); - commands.entity(original).remove::(); - commands.entity(original).remove::>(); - commands.entity(original).remove::>(); // also clear the sub assets tracker to free up handles, perhaps just freeing up the handles and leave the rest would be better ? - commands.entity(original).remove::(); - commands.entity(root_entity).despawn_recursive(); - } -} diff --git a/crates/bevy_gltf_components/LICENSE.md b/crates/bevy_gltf_components/LICENSE.md deleted file mode 100644 index ad21aac..0000000 --- a/crates/bevy_gltf_components/LICENSE.md +++ /dev/null @@ -1,4 +0,0 @@ -This crate is available under either: - -* The [MIT License](./LICENSE_MIT) -* The [Apache License, Version 2.0](./LICENSE_APACHE) \ No newline at end of file diff --git a/crates/bevy_gltf_components/LICENSE_APACHE.md b/crates/bevy_gltf_components/LICENSE_APACHE.md deleted file mode 100644 index f748977..0000000 --- a/crates/bevy_gltf_components/LICENSE_APACHE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [2023] [Mark "kaosat-dev" Moissette] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/crates/bevy_gltf_components/LICENSE_MIT.md b/crates/bevy_gltf_components/LICENSE_MIT.md deleted file mode 100644 index f8b9094..0000000 --- a/crates/bevy_gltf_components/LICENSE_MIT.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Mark "kaosat-dev" Moissette - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/crates/bevy_gltf_components/src/blender_settings/lighting.rs b/crates/bevy_gltf_components/src/blender_settings/lighting.rs deleted file mode 100644 index 622c0e1..0000000 --- a/crates/bevy_gltf_components/src/blender_settings/lighting.rs +++ /dev/null @@ -1,97 +0,0 @@ -use bevy::pbr::DirectionalLightShadowMap; -use bevy::prelude::*; - -use crate::GltfComponentsSet; - -pub(crate) fn plugin(app: &mut App) { - app.register_type::() - .register_type::() - .register_type::() - .add_systems( - Update, - (process_lights, process_shadowmap, process_background_shader) - .after(GltfComponentsSet::Injection), - ); -} - -#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] -#[reflect(Component)] -#[non_exhaustive] -/// The properties of a light's shadow , to enable controlling per light shadows from Blender -pub struct BlenderLightShadows { - pub enabled: bool, - pub buffer_bias: f32, -} - -/// The background color as described by Blender's [background shader](https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/background.html). -#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] -#[reflect(Component)] -#[non_exhaustive] -pub struct BlenderBackgroundShader { - pub color: Color, - pub strength: f32, -} - -/// The settings used by EEVEE's [shadow rendering](https://docs.blender.org/manual/en/latest/render/eevee/render_settings/shadows.html). -#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] -#[reflect(Component)] -#[non_exhaustive] -pub struct BlenderShadowSettings { - pub cascade_size: usize, -} - -fn process_lights( - mut directional_lights: Query< - (&mut DirectionalLight, Option<&BlenderLightShadows>), - Added, - >, - mut spot_lights: Query<(&mut SpotLight, Option<&BlenderLightShadows>), Added>, - mut point_lights: Query<(&mut PointLight, Option<&BlenderLightShadows>), Added>, -) { - for (mut light, blender_light_shadows) in directional_lights.iter_mut() { - if let Some(blender_light_shadows) = blender_light_shadows { - light.shadows_enabled = blender_light_shadows.enabled; - } else { - light.shadows_enabled = true; - } - } - for (mut light, blender_light_shadows) in spot_lights.iter_mut() { - if let Some(blender_light_shadows) = blender_light_shadows { - light.shadows_enabled = blender_light_shadows.enabled; - } else { - light.shadows_enabled = true; - } - } - - for (mut light, blender_light_shadows) in point_lights.iter_mut() { - if let Some(blender_light_shadows) = blender_light_shadows { - light.shadows_enabled = blender_light_shadows.enabled; - } else { - light.shadows_enabled = true; - } - } -} - -fn process_shadowmap( - shadowmaps: Query<&BlenderShadowSettings, Added>, - mut commands: Commands, -) { - for shadowmap in shadowmaps.iter() { - commands.insert_resource(DirectionalLightShadowMap { - size: shadowmap.cascade_size, - }); - } -} - -fn process_background_shader( - background_shaders: Query<&BlenderBackgroundShader, Added>, - mut commands: Commands, -) { - for background_shader in background_shaders.iter() { - commands.insert_resource(AmbientLight { - color: background_shader.color, - // Just a guess, see - brightness: background_shader.strength * 400.0, - }); - } -} diff --git a/crates/bevy_gltf_components/src/process_gltfs.rs b/crates/bevy_gltf_components/src/process_gltfs.rs deleted file mode 100644 index a37f537..0000000 --- a/crates/bevy_gltf_components/src/process_gltfs.rs +++ /dev/null @@ -1,97 +0,0 @@ -use bevy::{ - core::Name, - ecs::{ - entity::Entity, - query::{Added, Without}, - reflect::{AppTypeRegistry, ReflectComponent}, - world::World, - }, - gltf::GltfExtras, - hierarchy::Parent, - log::debug, - reflect::{Reflect, TypeRegistration}, - utils::HashMap, -}; - -use crate::{ronstring_to_reflect_component, GltfComponentsConfig, GltfProcessed}; - -/// main function: injects components into each entity in gltf files that have `gltf_extras`, using reflection -pub fn add_components_from_gltf_extras(world: &mut World) { - let mut extras = - world.query_filtered::<(Entity, &Name, &GltfExtras, &Parent), (Added, Without)>(); - let mut entity_components: HashMap, TypeRegistration)>> = - HashMap::new(); - - let gltf_components_config = world.resource::(); - - for (entity, name, extra, parent) in extras.iter(world) { - debug!( - "Name: {}, entity {:?}, parent: {:?}, extras {:?}", - name, entity, parent, extra - ); - - let type_registry: &AppTypeRegistry = world.resource(); - let type_registry = type_registry.read(); - - let reflect_components = ronstring_to_reflect_component( - &extra.value, - &type_registry, - gltf_components_config.legacy_mode, - ); - - // we assign the components specified /xxx_components objects to their parent node - let mut target_entity = entity; - // if the node contains "components" or ends with "_pa" (ie add to parent), the components will not be added to the entity itself but to its parent - // this is mostly used for Blender collections - if name.as_str().contains("components") || name.as_str().ends_with("_pa") { - debug!("adding components to parent"); - target_entity = parent.get(); - } - debug!("adding to {:?}", target_entity); - - // if there where already components set to be added to this entity (for example when entity_data was refering to a parent), update the vec of entity_components accordingly - // this allows for example blender collection to provide basic ecs data & the instances to override/ define their own values - if entity_components.contains_key(&target_entity) { - let mut updated_components: Vec<(Box, TypeRegistration)> = Vec::new(); - let current_components = &entity_components[&target_entity]; - // first inject the current components - for (component, type_registration) in current_components { - updated_components.push((component.clone_value(), type_registration.clone())); - } - // then inject the new components: this also enables overwrite components set in the collection - for (component, type_registration) in reflect_components { - updated_components.push((component.clone_value(), type_registration)); - } - entity_components.insert(target_entity, updated_components); - } else { - entity_components.insert(target_entity, reflect_components); - } - } - - for (entity, components) in entity_components { - let type_registry: &AppTypeRegistry = world.resource(); - let type_registry = type_registry.clone(); - let type_registry = type_registry.read(); - - if !components.is_empty() { - debug!("--entity {:?}, components {}", entity, components.len()); - } - for (component, type_registration) in components { - debug!( - "------adding {} {:?}", - component.get_represented_type_info().unwrap().type_path(), - component - ); - - { - let mut entity_mut = world.entity_mut(entity); - type_registration - .data::() - .expect("Unable to reflect component") - .insert(&mut entity_mut, &*component, &type_registry); - - entity_mut.insert(GltfProcessed); // this is how can we insert any additional components - } - } - } -} diff --git a/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs b/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs deleted file mode 100644 index 7506c89..0000000 --- a/crates/bevy_gltf_components/src/ronstring_to_reflect_component.rs +++ /dev/null @@ -1,134 +0,0 @@ -use bevy::log::{debug, warn}; -use bevy::reflect::serde::ReflectDeserializer; -use bevy::reflect::{Reflect, TypeInfo, TypeRegistration, TypeRegistry}; -use bevy::utils::HashMap; -use ron::Value; -use serde::de::DeserializeSeed; - -use super::capitalize_first_letter; - -pub fn ronstring_to_reflect_component( - ron_string: &str, - type_registry: &TypeRegistry, - simplified_types: bool, -) -> Vec<(Box, TypeRegistration)> { - let lookup: HashMap = ron::from_str(ron_string).unwrap(); - let mut components: Vec<(Box, TypeRegistration)> = Vec::new(); - for (key, value) in lookup.into_iter() { - let type_string = key.replace("component: ", "").trim().to_string(); - let capitalized_type_name = capitalize_first_letter(type_string.as_str()); - - let mut parsed_value: String; - match value.clone() { - Value::String(str) => { - parsed_value = str; - } - _ => parsed_value = ron::to_string(&value).unwrap().to_string(), - } - - if let Some(type_registration) = - type_registry.get_with_short_type_path(capitalized_type_name.as_str()) - { - debug!("TYPE INFO {:?}", type_registration.type_info()); - if simplified_types { - if let TypeInfo::TupleStruct(info) = type_registration.type_info() { - // we handle tupple strucs with only one field differently, as Blender's custom properties with custom ui (float, int, bool, etc) always give us a tupple struct - if info.field_len() == 1 { - let field = info - .field_at(0) - .expect("we should always have at least one field here"); - let field_name = field.type_path(); - let mut formated = parsed_value.clone(); - match field_name { - "f32" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "f64" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "u8" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "u16" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "u32" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "u64" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "u128" => { - formated = parsed_value.parse::().unwrap().to_string(); - } - "glam::Vec2" => { - let parsed: Vec = ron::from_str(&parsed_value).unwrap(); - formated = format!("(x:{},y:{})", parsed[0], parsed[1]); - } - "glam::Vec3" => { - let parsed: Vec = ron::from_str(&parsed_value).unwrap(); - formated = - format!("(x:{},y:{},z:{})", parsed[0], parsed[1], parsed[2]); - } - "bevy_render::color::Color" => { - let parsed: Vec = ron::from_str(&parsed_value).unwrap(); - if parsed.len() == 3 { - formated = format!( - "Rgba(red:{},green:{},blue:{}, alpha: 1.0)", - parsed[0], parsed[1], parsed[2] - ); - } - if parsed.len() == 4 { - formated = format!( - "Rgba(red:{},green:{},blue:{}, alpha:{})", - parsed[0], parsed[1], parsed[2], parsed[3] - ); - } - } - _ => {} - } - - parsed_value = format!("({formated})"); - } - } - - if parsed_value.is_empty() { - parsed_value = "()".to_string(); - } - } - let ron_string = format!( - "{{ \"{}\":{} }}", - type_registration.type_info().type_path(), - parsed_value - ); - - // usefull to determine what an entity looks like Serialized - /*let test_struct = CameraRenderGraph::new("name"); - let serializer = ReflectSerializer::new(&test_struct, &type_registry); - let serialized = - ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap(); - println!("serialized Component {}", serialized);*/ - - debug!("component data ron string {}", ron_string); - let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()) - .expect("deserialzer should have been generated from string"); - let reflect_deserializer = ReflectDeserializer::new(type_registry); - let component = reflect_deserializer - .deserialize(&mut deserializer) - .unwrap_or_else(|_| { - panic!( - "failed to deserialize component {} with value: {:?}", - key, value - ) - }); - - debug!("component {:?}", component); - debug!("real type {:?}", component.get_represented_type_info()); - components.push((component, type_registration.clone())); - debug!("found type registration for {}", capitalized_type_name); - } else { - warn!("no type registration for {}", capitalized_type_name); - } - } - components -} diff --git a/crates/bevy_gltf_save_load/Cargo.toml b/crates/bevy_gltf_save_load/Cargo.toml deleted file mode 100644 index a8f76c4..0000000 --- a/crates/bevy_gltf_save_load/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "bevy_gltf_save_load" -version = "0.5.0" -authors = ["Mark 'kaosat-dev' Moissette"] -description = "Save & load your bevy games" -homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -repository = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -keywords = ["gamedev", "bevy", "save", "load", "serialize"] -categories = ["game-development"] -edition = "2021" -license = "MIT OR Apache-2.0" - -[lints] -workspace = true - -[dependencies] -bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } -bevy_gltf_blueprints = { version = "0.11", path = "../bevy_gltf_blueprints" } - -[dev-dependencies] -bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] } diff --git a/crates/bevy_gltf_save_load/LICENSE.md b/crates/bevy_gltf_save_load/LICENSE.md deleted file mode 100644 index ad21aac..0000000 --- a/crates/bevy_gltf_save_load/LICENSE.md +++ /dev/null @@ -1,4 +0,0 @@ -This crate is available under either: - -* The [MIT License](./LICENSE_MIT) -* The [Apache License, Version 2.0](./LICENSE_APACHE) \ No newline at end of file diff --git a/crates/bevy_gltf_save_load/LICENSE_APACHE.md b/crates/bevy_gltf_save_load/LICENSE_APACHE.md deleted file mode 100644 index f748977..0000000 --- a/crates/bevy_gltf_save_load/LICENSE_APACHE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [2023] [Mark "kaosat-dev" Moissette] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/crates/bevy_gltf_save_load/LICENSE_MIT.md b/crates/bevy_gltf_save_load/LICENSE_MIT.md deleted file mode 100644 index f8b9094..0000000 --- a/crates/bevy_gltf_save_load/LICENSE_MIT.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Mark "kaosat-dev" Moissette - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/crates/bevy_gltf_save_load/src/gltf_out_test.rs b/crates/bevy_gltf_save_load/src/gltf_out_test.rs deleted file mode 100644 index e47b1fa..0000000 --- a/crates/bevy_gltf_save_load/src/gltf_out_test.rs +++ /dev/null @@ -1,216 +0,0 @@ -use gltf_json as json; -use json::camera::Type; -use json::validation::{Checked, Validate}; -use serde_json::value::{to_raw_value, RawValue}; -use serde::Serialize; -use bevy::reflect::TypeRegistryArc; - - -#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] -enum Output { - /// Output standard glTF. - Standard, - - /// Output binary glTF. - Binary, -} -#[derive(Serialize)] -struct MyExtraData { - a: u32, - b: u32, - BlueprintName: String, - SpawnHere: String, -} - -/* -pub fn serialize_gltf_inner(serialize: S) -> Result -where - S: Serialize, -{ - let pretty_config = ron::ser::PrettyConfig::default() - .indentor(" ".to_string()) - .new_line("\n".to_string()); - ron::ser::to_string_pretty(&serialize, pretty_config) -}*/ - -pub fn serialize_gltf(scene:&DynamicScene, registry: &TypeRegistryArc) { - -} - -pub fn save_game( - world: &mut World, -) { - - let mut save_path:String = "".into(); - let mut events = world - .resource_mut::>(); - for event in events.get_reader().read(&events) { - info!("SAVE EVENT !! {:?}", event); - save_path = event.path.clone(); - } - info!("SAVING TO {}", save_path); - events.clear(); - - let saveable_entities: Vec = world - .query_filtered::>() - .iter(world) - .collect(); - - debug!("saveable entities {}", saveable_entities.len()); - - let components = HashSet::from([ - TypeId::of::(), - TypeId::of::(), - TypeId::of::() , - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - - - - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - - TypeId::of::(), - - - - ]); - - let filter = SceneFilter::Allowlist(components); - - - let mut scene_builder = DynamicSceneBuilder::from_world(world).with_filter(filter); - - let dyn_scene = scene_builder - - - /* .allow::() - .allow::() - .allow::()*/ - - /* .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - // camera stuff - .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - .deny::() - //.deny::() - */ - .extract_entities(saveable_entities.into_iter()) - .build(); - - let serialized_scene = dyn_scene - .serialize_ron(world.resource::()) - .unwrap(); - - let mut root = gltf_json::Root::default(); - - // unfortunatly, not available yet - /*let node = root.push(json::Node { - //mesh: Some(mesh), - ..Default::default() - }); - - root.push(json::Scene { - extensions: Default::default(), - extras: Default::default(), - name: None, - nodes: vec![node], - });*/ - - - - - - let camera = json::camera::Perspective{ - aspect_ratio: Some(0.5), - yfov: 32.0, - zfar: Some(30.), - znear: 0.0, - extensions: None, - extras: None - }; - /*let camera = json::Camera{ - name:Some("Camera".into()), - orthographic: None, - perspective:None, - extensions: None, - extras: None, - type_: Checked, - };*/ - let gna = to_raw_value(&MyExtraData { a: 1, b: 2, BlueprintName: "Foo".into(), SpawnHere:"".into() }).unwrap() ; - let node = json::Node { - camera: None,//Some(camera), - children: None, - extensions: None, - extras: Some(gna), - matrix: None, - mesh:None, - name: Some("yeah".into()), - rotation: None, - scale: None, - translation: Some([0.5, 10.0 ,-100.]), - skin: None, - weights: None - // mesh: Some(json::Index::new(0)), - //..Default::default() - }; - - let root = json::Root { - accessors: vec![], //[positions, colors], - buffers: vec![], - buffer_views: vec![], - meshes: vec![], - nodes: vec![node], - scenes: vec![json::Scene { - extensions: Default::default(), - extras: Default::default(), - name: Some("Foo".to_string()), - nodes: vec![json::Index::new(0)], - }], - ..Default::default() - }; - - - - - let gltf_save_name = "test.gltf"; - let writer = fs::File::create(format!("assets/scenes/{gltf_save_name}") ).expect("I/O error"); - json::serialize::to_writer_pretty(writer, &root).expect("Serialization error"); - - // let bin = to_padded_byte_vector(triangle_vertices); - // let mut writer = fs::File::create("triangle/buffer0.bin").expect("I/O error"); - // writer.write_all(&bin).expect("I/O error"); - - - #[cfg(not(target_arch = "wasm32"))] - IoTaskPool::get() - .spawn(async move { - // Write the scene RON data to file - File::create(format!("assets/scenes/{save_path}")) - .and_then(|mut file| file.write(serialized_scene.as_bytes())) - .expect("Error while writing scene to file"); - - - - }) - .detach(); -} \ No newline at end of file diff --git a/crates/bevy_registry_export/Cargo.toml b/crates/bevy_registry_export/Cargo.toml deleted file mode 100644 index 291f465..0000000 --- a/crates/bevy_registry_export/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "bevy_registry_export" -version = "0.4.0" -authors = ["Mark 'kaosat-dev' Moissette", "Pascal 'Killercup' Hertleif"] -description = "Allows you to create a Json export of all your components/ registered types of your Bevy app/game" -homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -repository = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -keywords = ["gamedev", "bevy", "assets", "registry", "components"] -categories = ["game-development"] -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", default-features = false, features = ["bevy_scene"] } -bevy_reflect = { version = "0.14", default-features = false } -bevy_app = { version = "0.14", default-features = false, features = ["bevy_reflect"] } -bevy_ecs = { version = "0.14", default-features = false, features = ["bevy_reflect"] } -serde_json = "1.0.108" - -[dev-dependencies] -bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/bevy_registry_export/LICENSE.md b/crates/bevy_registry_export/LICENSE.md deleted file mode 100644 index ad21aac..0000000 --- a/crates/bevy_registry_export/LICENSE.md +++ /dev/null @@ -1,4 +0,0 @@ -This crate is available under either: - -* The [MIT License](./LICENSE_MIT) -* The [Apache License, Version 2.0](./LICENSE_APACHE) \ No newline at end of file diff --git a/crates/bevy_registry_export/LICENSE_APACHE.md b/crates/bevy_registry_export/LICENSE_APACHE.md deleted file mode 100644 index 43c47c4..0000000 --- a/crates/bevy_registry_export/LICENSE_APACHE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [2024] [Mark "kaosat-dev" Moissette] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/crates/bevy_gltf_components/Cargo.toml b/crates/blenvy/Cargo.toml similarity index 51% rename from crates/bevy_gltf_components/Cargo.toml rename to crates/blenvy/Cargo.toml index f1ae355..72e90a0 100644 --- a/crates/bevy_gltf_components/Cargo.toml +++ b/crates/blenvy/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "bevy_gltf_components" -version = "0.6.0" +name = "blenvy" +version = "0.1.0-alpha.1" authors = ["Mark 'kaosat-dev' Moissette"] description = "Allows you to define Bevy components direclty inside gltf files and instanciate the components on the Bevy side." -homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" -repository = "https://github.com/kaosat-dev/Blender_bevy_components_workflow" +homepage = "https://github.com/kaosat-dev/Blenvy" +repository = "https://github.com/kaosat-dev/Blenvy" keywords = ["gamedev", "bevy", "assets", "gltf", "components"] categories = ["game-development"] edition = "2021" @@ -14,9 +14,24 @@ license = "MIT OR Apache-2.0" workspace = true [dependencies] -bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] } +bevy = { version = "0.14", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "file_watcher"] } serde = "1.0.188" ron = "0.8.1" +serde_json = "1.0.108" +gltf = { version = "1.4.0", default-features = false, features = [ + "KHR_lights_punctual", + "KHR_materials_transmission", + "KHR_materials_ior", + "KHR_materials_volume", + "KHR_materials_unlit", + "KHR_materials_emissive_strength", + "KHR_texture_transform", + "extras", + "extensions", + "names", + "utils", +] } + [dev-dependencies] bevy = { version = "0.14", default-features = false, features = ["dynamic_linking"] } \ No newline at end of file diff --git a/crates/bevy_gltf_blueprints/LICENSE.md b/crates/blenvy/LICENSE.md similarity index 100% rename from crates/bevy_gltf_blueprints/LICENSE.md rename to crates/blenvy/LICENSE.md diff --git a/crates/bevy_gltf_blueprints/LICENSE_APACHE.md b/crates/blenvy/LICENSE_APACHE.md similarity index 100% rename from crates/bevy_gltf_blueprints/LICENSE_APACHE.md rename to crates/blenvy/LICENSE_APACHE.md diff --git a/crates/bevy_registry_export/LICENSE_MIT.md b/crates/blenvy/LICENSE_MIT.md similarity index 100% rename from crates/bevy_registry_export/LICENSE_MIT.md rename to crates/blenvy/LICENSE_MIT.md diff --git a/crates/blenvy/README.md b/crates/blenvy/README.md new file mode 100644 index 0000000..831bdb6 --- /dev/null +++ b/crates/blenvy/README.md @@ -0,0 +1,331 @@ +[![Crates.io](https://img.shields.io/crates/v/blenvy)](https://crates.io/crates/blenvy) +[![Docs](https://img.shields.io/docsrs/blenvy)](https://docs.rs/blenvy/latest/blenvy/) +[![License](https://img.shields.io/crates/l/blenvy)](https://github.com/kaosat-dev/Blenvy/blob/main/crates/blenvy/License.md) +[![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) + +# blenvy + +This crate allows you to +- define [Bevy](https://bevyengine.org/) components direclty inside gltf files and instanciate the components on the Bevy side. +- define Blueprints/Prefabs for [Bevy](https://bevyengine.org/) inside gltf files and spawn them in Bevy. + * Allows you to create lightweight levels, where all assets are different gltf files and loaded after the main level is loaded + * Allows you to spawn different entities from gtlf files at runtime in a clean manner, including simplified animation support ! + + A blueprint is a set of **overrideable** components + a hierarchy: ie + + * just a Gltf file with Gltf_extras specifying components + * a component called BlueprintInfo + + Particularly useful when using [Blender](https://www.blender.org/) as an editor for the [Bevy](https://bevyengine.org/) game engine, combined with the Blender add-on that do a lot of the work for you + - [blenvy](https://github.com/kaosat-dev/Blenvy/tree/main/tools/blenvy) +- allows you to create a Json export of all your components/ registered types. +Its main use case is as a backbone for the [```blenvy``` Blender add-on](https://github.com/kaosat-dev/Blenvy/tree/main/tools/blenvy), that allows you to add & edit components directly in Blender, using the actual type definitions from Bevy +(and any of your custom types & components that you register in Bevy). +- adds the ability to easilly **save** and **load** your game worlds for [Bevy](https://bevyengine.org/) . + +* leverages blueprints & seperation between + * **dynamic** entities : entities that can change during the lifetime of your app/game + * **static** entities : entities that do NOT change (typically, a part of your levels/ environements) +* and allows allow for : + * a simple save/load workflow thanks to the above + * ability to specify **which entities** to save or to exclude + * ability to specify **which components** to save or to exclude + * ability to specify **which resources** to save or to exclude + * small(er) save files (only a portion of the entities is saved) + +Particularly useful when using [Blender](https://www.blender.org/) as an editor for the [Bevy](https://bevyengine.org/) game engine, combined with the [Blender plugin](https://github.com/kaosat-dev/Blenvy/tree/main/tools/blenvy) that does a lot of the work for you (including spliting generating seperate gltf files for your static vs dynamic assets) + +## Usage + +Here's a minimal usage example: + +```toml +# Cargo.toml +[dependencies] +bevy="0.14" +blenvy = { version = "0.1.0"} + +``` + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugins(BlenvyPlugin) + + .add_systems(Startup, setup_game) + .add_systems(Update, spawn_blueprint_instance) + .run(); +} + + +// this is how you setup & spawn a level from a blueprint +fn setup_game( + mut commands: Commands, +) { + + // here we spawn our game world/level, which is also a blueprint ! + commands.spawn(( + BlueprintInfo::from_path("levels/World.glb"), // all we need is a Blueprint info... + SpawnBlueprint, // and spawnblueprint to tell blenvy to spawn the blueprint now + HideUntilReady, // only reveal the level once it is ready + GameWorldTag, + )); +} + +fn spawn_blueprint_instance( + mut commands: Commands, + keycode: Res>, +){ + if keycode.just_pressed(KeyCode::S) { + let new_entity = commands.spawn(( + BlueprintInfo(name: "Health_Pickup".to_string(), path:""), // mandatory !! + SpawnBlueprint, // mandatory !! + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), // VERY important !! + // any other component you want to insert + )); + } +} +``` + +## Installation + +Add the following to your `[dependencies]` section in `Cargo.toml`: + +```toml +blenvy = "0.1.0" +``` + +Or use `cargo add`: + +```toml +cargo add blenvy +``` + +## Setup + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_plugin(BlenvyPlugin) + + .run(); +} + +``` + +you may want to configure your "library"/"blueprints" settings: + +```rust no_run +use bevy::prelude::*; +use blenvy::*; + +fn main() { + App::new() + .add_plugins(( + BlenvyPlugin{ + aabbs: true, // defaults to false, enable this to automatically calculate aabb for the scene/blueprint + ..Default::default() + } + )) + .run(); +} + +``` + +## Spawning entities from blueprints + +You can spawn entities from blueprints like this: +```rust no_run +commands.spawn(( + BlueprintInfo("Health_Pickup".to_string()), // mandatory !! + SpawnBlueprint, // mandatory !! + + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), // optional + // any other component you want to insert +)) + +``` + +Once spawning of the actual entity is done, the spawned Blueprint will be *gone/merged* with the contents of Blueprint ! + +> Important : +you can **add** or **override** components present inside your Blueprint when spawning the BluePrint itself: ie + +### Adding components not specified inside the blueprint + +you can just add any additional components you need when spawning : + +```rust no_run +commands.spawn(( + BlueprintInfo("Health_Pickup".to_string()), + SpawnBlueprint, + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), + // from Rapier/bevy_xpbd: this means the entity will also have a velocity component when inserted into the world + Velocity { + linvel: Vec3::new(vel_x, vel_y, vel_z), + angvel: Vec3::new(0.0, 0.0, 0.0), + }, +)) + +``` +### Overriding components specified inside the blueprint + +any component you specify when spawning the Blueprint that is also specified **within** the Blueprint will **override** that component in the final spawned entity + +for example +```rust no_run +commands.spawn(( + BlueprintInfo(path: "Health_Pickup.glb".into()), + SpawnBlueprint, + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), + HealthPowerUp(20)// if this is component is also present inside the "Health_Pickup" blueprint, that one will be replaced with this component during spawning +)) + +``` + +### BluePrintBundle + +There is also a ```BluePrintBundle``` for convenience , which just has + * a ```BlueprintInfo``` component + * a ```SpawnBlueprint``` component + +## Additional information + +- When a blueprint is spawned, an ```FromBlueprint``` component is inserted into all its children entities (and nested children etc) +- this crate also provides a special optional ```GameWorldTag``` component: this is useful when you want to keep all your spawned entities inside a root entity + +You can use it in your queries to add your entities as children of this "world" +This way all your levels, your dynamic entities etc, are kept seperated from UI nodes & other entities that are not relevant to the game world + +> Note: you should only have a SINGLE entity tagged with that component ! + +```rust no_run + commands.spawn(( + BlueprintInfo::from_path("levels/World.glb"), + SpawnBlueprint, + HideUntilReady, + GameWorldTag, // here it is + )); +``` + + +## SystemSet + +the ordering of systems is very important ! + +For example to replace your proxy components (stand-in components when you cannot/ do not want to use real components in the gltf file) with actual ones, which should happen **AFTER** the Blueprint based spawning, + +so ```blenvy``` provides a **SystemSet** for that purpose: ```GltfBlueprintsSet``` + +Typically , the order of systems should be + +***bevy_gltf_components (GltfComponentsSet::Injection)*** => ***blenvy (GltfBlueprintsSet::Spawn, GltfBlueprintsSet::AfterSpawn)*** => ***replace_proxies*** + +see https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/basic for how to set it up correctly + + + +## Animation + +```blenvy``` provides some lightweight helpers to deal with animations stored in gltf files + + * an ```Animations``` component that gets inserted into spawned (root) entities that contains a hashmap of all animations contained inside that entity/gltf file . + (this is a copy of the ```named_animations``` inside Bevy's gltf structures ) + * an ```AnimationPlayerLink``` component that gets inserted into spawned (root) entities, to make it easier to trigger/ control animations than it usually is inside Bevy + Gltf files + +The workflow for animations is as follows: +* create a gltf file with animations (using Blender & co) as you would normally do +* inside Bevy, use the ```blenvy``` boilerplate (see sections above), no specific setup beyond that is required +* to control the animation of an entity, you need to query for entities that have both ```AnimationPlayerLink``` and ```Animations``` components (added by ```blenvy```) AND entities with the ```AnimationPlayer``` component + +For example: + +```rust no_run +// example of changing animation of entities based on proximity to the player, for "fox" entities (Tag component) +pub fn animation_change_on_proximity_foxes( + players: Query<&GlobalTransform, With>, + animated_foxes: Query<(&GlobalTransform, &AnimationPlayerLink, &Animations ), With>, + + mut animation_players: Query<&mut AnimationPlayer>, + +){ + for player_transforms in players.iter() { + for (fox_tranforms, link, animations) in animated_foxes.iter() { + let distance = player_transforms + .translation() + .distance(fox_tranforms.translation()); + let mut anim_name = "Walk"; + if distance < 8.5 { + anim_name = "Run"; + } + else if distance >= 8.5 && distance < 10.0{ + anim_name = "Walk"; + } + else if distance >= 10.0 && distance < 15.0{ + anim_name = "Survey"; + } + // now play the animation based on the chosen animation name + let mut animation_player = animation_players.get_mut(link.0).unwrap(); + animation_player.play_with_transition( + animations.named_animations.get(anim_name).expect("animation name should be in the list").clone(), + Duration::from_secs(3) + ).repeat(); + } + } +} +``` + +see https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/animation for how to set it up correctly + +particularly from https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/animation/game/in_game.rs + + +## Materials + +Ff you enable it on the blender side, Blenvy will be using "material libraries" to share common textures/materials between blueprints, in order to avoid asset & memory bloat: +Ie for example without this option, 56 different blueprints using the same material with a large texture would lead to the material/texture being embeded +56 times !! + + +Generating optimised blueprints and material libraries can be automated using the latests version of the [Blender plugin](https://github.com/kaosat-dev/Blenvy/tree/main/tools/blenvy) + + +## Examples + +https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/components + +https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/blueprints + +https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/animation + +https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/save_load + +https://github.com/kaosat-dev/Blenvy/tree/main/examples/blenvy/demo (a full fledged demo) + + +## Compatible Bevy versions + +The main branch is compatible with the latest Bevy release, while the branch `bevy_main` tries to track the `main` branch of Bevy (PRs updating the tracked commit are welcome). + +Compatibility of `blenvy` versions: +| `blenvy` | `bevy` | +| :-- | :-- | +| `0.1 - 0.2` | `0.14` | +| branch `main` | `0.14` | +| branch `bevy_main` | `main` | + + +## License + +This crate, all its code, contents & assets is Dual-licensed under either of + +- Apache License, Version 2.0, ([LICENSE-APACHE](./LICENSE_APACHE.md) or https://www.apache.org/licenses/LICENSE-2.0) +- MIT license ([LICENSE-MIT](./LICENSE_MIT.md) or https://opensource.org/licenses/MIT) \ No newline at end of file diff --git a/crates/bevy_gltf_blueprints/README.md b/crates/blenvy/README_blueprints.md similarity index 100% rename from crates/bevy_gltf_blueprints/README.md rename to crates/blenvy/README_blueprints.md diff --git a/crates/bevy_gltf_components/README.md b/crates/blenvy/README_components.md similarity index 100% rename from crates/bevy_gltf_components/README.md rename to crates/blenvy/README_components.md diff --git a/crates/bevy_registry_export/README.md b/crates/blenvy/README_registry.md similarity index 100% rename from crates/bevy_registry_export/README.md rename to crates/blenvy/README_registry.md diff --git a/crates/bevy_gltf_save_load/README.md b/crates/blenvy/README_save_load.md similarity index 100% rename from crates/bevy_gltf_save_load/README.md rename to crates/blenvy/README_save_load.md diff --git a/crates/bevy_gltf_blueprints/src/aabb.rs b/crates/blenvy/src/blueprints/aabb.rs similarity index 62% rename from crates/bevy_gltf_blueprints/src/aabb.rs rename to crates/blenvy/src/blueprints/aabb.rs index 7c1c218..8e46aef 100644 --- a/crates/bevy_gltf_blueprints/src/aabb.rs +++ b/crates/blenvy/src/blueprints/aabb.rs @@ -1,14 +1,15 @@ use bevy::{math::Vec3A, prelude::*, render::primitives::Aabb}; -use crate::{BluePrintsConfig, Spawned}; +use crate::{BlenvyConfig, BlueprintReadyForFinalizing, BlueprintReadyForPostProcess}; /// helper system that computes the compound aabbs of the scenes/blueprints pub fn compute_scene_aabbs( - root_entities: Query<(Entity, &Name), (With, Without)>, + root_entities: Query<(Entity, &Name), (With, Without)>, + other_entities: Query, With)>, children: Query<&Children>, existing_aabbs: Query<&Aabb>, - mut blueprints_config: ResMut, + mut blenvy_config: ResMut, mut commands: Commands, ) { // compute compound aabb @@ -16,18 +17,29 @@ pub fn compute_scene_aabbs( // info!("generating aabb for {:?}", name); // only recompute aabb if it has not already been done before - if blueprints_config.aabb_cache.contains_key(&name.to_string()) { - let aabb = blueprints_config + if blenvy_config.aabb_cache.contains_key(&name.to_string()) { + let aabb = blenvy_config .aabb_cache .get(&name.to_string()) .expect("we should have the aabb available"); - commands.entity(root_entity).insert(*aabb); + commands + .entity(root_entity) + .insert(*aabb) + .insert(BlueprintReadyForFinalizing); } else { let aabb = compute_descendant_aabb(root_entity, &children, &existing_aabbs); - commands.entity(root_entity).insert(aabb); - blueprints_config.aabb_cache.insert(name.to_string(), aabb); + blenvy_config.aabb_cache.insert(name.to_string(), aabb); + info!("generating aabb for {:?}", name); + commands + .entity(root_entity) + .insert(aabb) + .insert(BlueprintReadyForFinalizing); } } + for entity in other_entities.iter() { + println!("already got AABB"); + commands.entity(entity).insert(BlueprintReadyForFinalizing); // FIXME ! Yikes !! + } } pub fn compute_descendant_aabb( diff --git a/crates/blenvy/src/blueprints/animation.rs b/crates/blenvy/src/blueprints/animation.rs new file mode 100644 index 0000000..0b4186c --- /dev/null +++ b/crates/blenvy/src/blueprints/animation.rs @@ -0,0 +1,243 @@ +use bevy::prelude::*; +use bevy::utils::HashMap; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// storage for animations for a given entity's BLUEPRINT (ie for example a characters animations), essentially a clone of gltf's `named_animations` +pub struct BlueprintAnimations { + pub named_animations: HashMap>, + pub named_indices: HashMap, + pub graph: Handle, +} + +#[derive(Component, Debug)] +/// Stop gap helper component : this is inserted into a "root" entity (an entity representing a whole gltf file) +/// so that the root entity knows which of its children contains an actualy `AnimationPlayer` component +/// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down" +/// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid +pub struct BlueprintAnimationPlayerLink(pub Entity); + +#[derive(Component, Debug)] +/// Same as the above but for `AnimationInfos` components which get added (on the Blender side) to the entities that actually have the animations +/// which often is not the Blueprint or blueprint instance entity itself. +pub struct BlueprintAnimationInfosLink(pub Entity); + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// storage for scene level animations for a given entity (hierarchy), essentially a clone of gltf's `named_animations` +pub struct SceneAnimations { + pub named_animations: HashMap>, + pub named_indices: HashMap, + pub graph: Handle, +} + +#[derive(Component, Debug)] +/// Stop gap helper component : this is inserted into a "root" entity (an entity representing a whole gltf file) +/// so that the root entity knows which of its children contains an actualy `AnimationPlayer` component +/// this is for convenience, because currently , Bevy's gltf parsing inserts `AnimationPlayers` "one level down" +/// ie armature/root for animated models, which means more complex queries to trigger animations that we want to avoid +pub struct SceneAnimationPlayerLink(pub Entity); + +#[derive(Component, Debug)] +/// Same as the above but for scene's `AnimationInfos` components which get added (on the Blender side) to the entities that actually have the animations +/// which often is not the Blueprint or blueprint instance entity itself. +pub struct SceneAnimationInfosLink(pub Entity); + +/// Stores Animation information: name, frame informations etc +#[derive(Reflect, Default, Debug)] +pub struct AnimationInfo { + pub name: String, + pub frame_start: f32, + pub frame_end: f32, + pub frames_length: f32, + pub frame_start_override: f32, + pub frame_end_override: f32, +} + +/// Stores information about animations, to make things a bit easier api wise: +/// these components are automatically inserted by the `blenvy` Blender add-on on entities that have animations +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct AnimationInfos { + pub animations: Vec, +} + +#[derive(Reflect, Default, Debug)] +pub struct AnimationMarker { + // pub frame: u32, + pub name: String, + pub handled_for_cycle: bool, +} + +/// Stores information about animation markers: practical for adding things like triggering events at specific keyframes etc +/// it is essentiall a hashmap of `AnimationName` => `HashMap`<`FrameNumber`, Vec of marker names> +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct AnimationMarkers(pub HashMap>>); + +/// Event that gets triggered once a specific marker inside an animation has been reached (frame based) +/// Provides some usefull information about which entity , wich animation, wich frame & which marker got triggered +#[derive(Event, Debug)] +pub struct AnimationMarkerReached { + pub entity: Entity, + pub animation_name: String, + pub frame: u32, + pub marker_name: String, +} + +///////////////////// + + +/// triggers events when a given animation marker is reached for BLUEPRINT animations +pub fn trigger_blueprint_animation_markers_events( + animation_data: Query<(Entity, &BlueprintAnimationPlayerLink, &BlueprintAnimationInfosLink, &BlueprintAnimations)>, + // FIXME: annoying hiearchy issue yet again: the Markers & AnimationInfos are stored INSIDE the blueprint, so we need to access them differently + animation_infos: Query<(&AnimationInfos, &AnimationMarkers)>, + animation_players: Query<&AnimationPlayer>, + mut animation_marker_events: EventWriter, + + animation_clips: Res>, +) { + for (entity, player_link, infos_link, animations) in animation_data.iter() { + + for (animation_name, node_index) in animations.named_indices.iter() { + + let animation_player = animation_players.get(player_link.0).unwrap(); + let (animation_infos, animation_markers) = animation_infos.get(infos_link.0).unwrap(); + + if animation_player.animation_is_playing(*node_index) { + if let Some(animation) = animation_player.animation(*node_index) { + // animation.speed() + // animation.completions() + if let Some(animation_clip_handle) = animations.named_animations.get(animation_name) { + if let Some(animation_clip) = animation_clips.get(animation_clip_handle) { + let animation_length_seconds = animation_clip.duration(); + let animation_length_frames = animation_infos // FIXME: horribly inneficient + .animations + .iter() + .find(|anim| &anim.name == animation_name) + .unwrap() + .frames_length; + + + // TODO: we also need to take playback speed into account + let time_in_animation = animation.elapsed() + - (animation.completions() as f32) * animation_length_seconds; + let frame_seconds = (animation_length_frames / animation_length_seconds) + * time_in_animation; + // println!("frame seconds {}", frame_seconds); + let frame = frame_seconds.ceil() as u32; // FIXME , bad hack + + let matching_animation_marker = &animation_markers.0[animation_name]; + + if matching_animation_marker.contains_key(&frame) { + let matching_markers_per_frame = + matching_animation_marker.get(&frame).unwrap(); + println!("FOUND A MARKER {:?} at frame {}", matching_markers_per_frame, frame); + // FIXME: complete hack-ish solution , otherwise this can fire multiple times in a row, depending on animation length , speed , etc + let diff = frame as f32 - frame_seconds; + if diff < 0.1 { + for marker_name in matching_markers_per_frame { + animation_marker_events.send(AnimationMarkerReached { + entity, + animation_name: animation_name.clone(), + frame, + marker_name: marker_name.clone(), + }); + } + } + } + } + } + } + } + } + } +} + + +/// triggers events when a given animation marker is reached for INSTANCE animations +pub fn trigger_instance_animation_markers_events( + animation_infos: Query<( + Entity, + &AnimationMarkers, + &SceneAnimationPlayerLink, + &SceneAnimations, + &AnimationInfos, + )>, + animation_players: Query<&AnimationPlayer>, + animation_clips: Res>, + animation_graphs: Res>, + mut animation_marker_events: EventWriter, +) { + for (entity, markers, player_link, animations, animation_infos) in animation_infos.iter() { + //let (animation_player, animation_transitions) = animation_players.get(player_link.0).unwrap(); + //let foo = animation_transitions.get_main_animation().unwrap(); + + for (animation_name, node_index) in animations.named_indices.iter() { + let animation_player = animation_players.get(player_link.0).unwrap(); + if animation_player.animation_is_playing(*node_index) { + if let Some(animation) = animation_player.animation(*node_index) { + if let Some(animation_clip_handle) = animations.named_animations.get(animation_name) { + if let Some(animation_clip) = animation_clips.get(animation_clip_handle) { + + println!("helooo") + } + } + } + } + } + + /*let animation_clip = animation_clips.get(animation_player.animation_clip()); + // animation_player.play(animation) + + if animation_clip.is_some() { + // println!("Entity {:?} markers {:?}", entity, markers); + // println!("Player {:?} {}", animation_player.elapsed(), animation_player.completions()); + // FIMXE: yikes ! very inneficient ! perhaps add boilerplate to the "start playing animation" code so we know what is playing + let animation_name = animations.named_animations.iter().find_map(|(key, value)| { + if value == animation_player.animation_clip() { + Some(key) + } else { + None + } + }); + if animation_name.is_some() { + let animation_name = animation_name.unwrap(); + + let animation_length_seconds = animation_clip.unwrap().duration(); + let animation_length_frames = animation_infos + .animations + .iter() + .find(|anim| &anim.name == animation_name) + .unwrap() + .frames_length; + // TODO: we also need to take playback speed into account + let time_in_animation = animation_player.elapsed() + - (animation_player.completions() as f32) * animation_length_seconds; + let frame_seconds = + (animation_length_frames / animation_length_seconds) * time_in_animation; + let frame = frame_seconds as u32; + + let matching_animation_marker = &markers.0[animation_name]; + if matching_animation_marker.contains_key(&frame) { + let matching_markers_per_frame = matching_animation_marker.get(&frame).unwrap(); + + // let timediff = animation_length_seconds - time_in_animation; + // println!("timediff {}", timediff); + // println!("FOUND A MARKER {:?} at frame {}", matching_markers_per_frame, frame); + // emit an event AnimationMarkerReached(entity, animation_name, frame, marker_name) + // FIXME: problem, this can fire multiple times in a row, depending on animation length , speed , etc + for marker in matching_markers_per_frame { + animation_marker_events.send(AnimationMarkerReached { + entity, + animation_name: animation_name.clone(), + frame, + marker_name: marker.clone(), + }); + } + } + } + }*/ + } +} diff --git a/crates/blenvy/src/blueprints/assets.rs b/crates/blenvy/src/blueprints/assets.rs new file mode 100644 index 0000000..7e3a67c --- /dev/null +++ b/crates/blenvy/src/blueprints/assets.rs @@ -0,0 +1,77 @@ +use bevy::{asset::LoadedUntypedAsset, prelude::*}; +use serde::Deserialize; + +/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints +#[derive(Component, Reflect, Default, Debug, Deserialize)] +#[reflect(Component)] +pub struct BlueprintAsset { + pub name: String, + pub path: String, +} + +/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints +/// these are only the DIRECT dependencies of a blueprint, does not contain the indirect assets (ie assets of sub blueprints, etc) +#[derive(Component, Reflect, Default, Debug, Deserialize)] +#[reflect(Component)] +pub struct BlueprintAssets { + /// only this field should get filled in from the Blender side + pub assets: Vec, + /// set to default when deserializing + #[serde(default)] + #[reflect(default)] + pub loaded: bool, + /// set to default when deserializing + #[serde(default)] + #[reflect(default)] + pub progress: f32, + #[reflect(ignore)] + #[serde(skip)] + pub asset_infos: Vec, +} +//(pub Vec); + +/// helper component, is used to store the list of sub blueprints to enable automatic loading of dependend blueprints +#[derive(Component, Reflect, Default, Debug, Deserialize)] +pub struct BlueprintAllAssets { + /// only this field should get filled in from the Blender side + pub assets: Vec, +} + + +//////////////////////// +/// +/// flag component, usually added when a blueprint is loaded +#[derive(Component)] +pub(crate) struct BlueprintAssetsLoaded; +/// flag component +#[derive(Component)] +pub(crate) struct BlueprintAssetsNotLoaded; + +/// helper component, for tracking loaded assets's loading state, id , handle etc +#[derive(Debug, Reflect)] +pub struct AssetLoadTracker { + #[allow(dead_code)] + pub name: String, + pub path: String, + pub id: AssetId, + pub loaded: bool, + #[allow(dead_code)] + pub handle: Handle, +} + +/// helper component, for tracking loaded assets +#[derive(Component, Debug)] +pub(crate) struct BlueprintAssetsLoadState { + pub all_loaded: bool, + pub asset_infos: Vec, + pub progress: f32, +} +impl Default for BlueprintAssetsLoadState { + fn default() -> Self { + Self { + all_loaded: Default::default(), + asset_infos: Default::default(), + progress: Default::default(), + } + } +} diff --git a/crates/bevy_gltf_blueprints/src/copy_components.rs b/crates/blenvy/src/blueprints/copy_components.rs similarity index 98% rename from crates/bevy_gltf_blueprints/src/copy_components.rs rename to crates/blenvy/src/blueprints/copy_components.rs index f978382..b2a12b5 100644 --- a/crates/bevy_gltf_blueprints/src/copy_components.rs +++ b/crates/blenvy/src/blueprints/copy_components.rs @@ -1,4 +1,5 @@ -use bevy::{ecs::world::Command, prelude::*}; +use bevy::ecs::world::Command; +use bevy::prelude::*; use std::any::TypeId; // originally based https://github.com/bevyengine/bevy/issues/1515, diff --git a/crates/blenvy/src/blueprints/hot_reload.rs b/crates/blenvy/src/blueprints/hot_reload.rs new file mode 100644 index 0000000..98e42fd --- /dev/null +++ b/crates/blenvy/src/blueprints/hot_reload.rs @@ -0,0 +1,107 @@ +use crate::{BlueprintAssetsLoadState, BlueprintAssetsLoaded, BlueprintInfo, BlueprintInstanceReady, BlueprintSpawning, FromBlueprint, SpawnBlueprint, SubBlueprintsSpawnTracker}; +use bevy::asset::AssetEvent; +use bevy::prelude::*; +use bevy::scene::SceneInstance; +use bevy::utils::hashbrown::HashMap; + + +/// Resource mapping asset paths (ideally untyped ids, but more complex) to a list of blueprint instance entity ids +#[derive(Debug, Clone, Resource, Default)] +pub(crate) struct AssetToBlueprintInstancesMapper{ + // pub(crate) untyped_id_to_blueprint_entity_ids: HashMap> + pub(crate) untyped_id_to_blueprint_entity_ids: HashMap> +} + +pub(crate) fn react_to_asset_changes( + mut gltf_events: EventReader>, // FIXME: Problem: we need to react to any asset change, not just gltf files ! + // mut untyped_events: EventReader>, + blueprint_assets: Query<( + Entity, + Option<&Name>, + &BlueprintInfo, + Option<&Children>, + )>, + blueprint_children_entities: Query<&FromBlueprint>, //=> can only be used if the entites are tagged + assets_to_blueprint_instances: Res, + all_parents: Query<&Parent>, + spawning_blueprints: Query<&BlueprintSpawning>, + + asset_server: Res, + mut commands: Commands, + +) { + let mut respawn_candidates: Vec<&Entity> = vec![]; + + for event in gltf_events.read() { + // LoadedUntypedAsset + match event { + AssetEvent::Modified { id } => { + // React to the gltf file being modified + // println!("Modified gltf {:?}", asset_server.get_path(*id)); + if let Some(asset_path) = asset_server.get_path(*id) { + // let untyped = asset_server.get_handle_untyped(asset_path.clone()); + // println!("matching untyped handle {:?}", untyped); + // let bla = untyped.unwrap().id(); + // asset_server.get + // in order to avoid respawn both a parent & a child , which would crash Bevy, we do things in two steps + if let Some(entities) = assets_to_blueprint_instances.untyped_id_to_blueprint_entity_ids.get(&asset_path.to_string()) { + for entity in entities.iter() { + println!("matching blueprint instance {}", entity); + // disregard entities that are already (re) spawning + if !respawn_candidates.contains(&entity) && blueprint_assets.get(*entity).is_ok() && spawning_blueprints.get(*entity).is_err() + { + respawn_candidates.push(entity); + } + + } + } + } + } + _ => {} + } + } + // we process all candidates here to deal with the case where multiple assets have changed in a single frame, which could cause respawn chaos + // now find hierarchy of changes and only set the uppermost parent up for respawning + // TODO: improve this, very inneficient + let mut retained_candidates: Vec = vec![]; + 'outer: for entity in respawn_candidates.iter() { + for parent in all_parents.iter_ancestors(**entity){ + for ent in respawn_candidates.iter() { + if **ent == parent { + if ! retained_candidates.contains(&parent) { + retained_candidates.push(parent); + } + continue 'outer; + } + } + } + if ! retained_candidates.contains(entity) { + retained_candidates.push(**entity); + } + } + // println!("respawn candidates {:?}", respawn_candidates); + for retained in retained_candidates.iter() { + println!("retained {}", retained); + + if let Ok((entity, entity_name, _blueprint_info, children)) = blueprint_assets.get(*retained) { + println!("HOLY MOLY IT DETECTS !!, now respawn {:?}", entity_name); + + // TODO: only remove those that are "in blueprint" + if children.is_some() { + for child in children.unwrap().iter() { + commands.entity(*child).despawn_recursive(); + } + } + commands + .entity(entity) + .remove::() + .remove::() + .remove::() + .remove::() + .remove::() + .insert(SpawnBlueprint); + } + } + + // println!("done with asset updates"); +} diff --git a/crates/blenvy/src/blueprints/materials.rs b/crates/blenvy/src/blueprints/materials.rs new file mode 100644 index 0000000..2e84770 --- /dev/null +++ b/crates/blenvy/src/blueprints/materials.rs @@ -0,0 +1,88 @@ +use bevy::prelude::*; + +use crate::BlenvyConfig; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// struct containing the name & path of the material to apply +pub struct MaterialInfo { + pub name: String, + pub path: String, +} + +#[derive(Component, Default, Debug)] +pub struct MaterialProcessed; + +/// system that injects / replaces materials from material library +pub(crate) fn inject_materials( + mut blenvy_config: ResMut, + material_infos: Query< + (Entity, &MaterialInfo, &Children), + Without, // (With) + /*( + Added, + With, + ),*/ + >, + with_materials_and_meshes: Query< + (), + ( + With, + With>, + With>, + ), + >, + assets_gltf: Res>, + asset_server: Res, + + mut commands: Commands, +) { + for (entity, material_info, children) in material_infos.iter() { + let material_full_path = format!("{}#{}", material_info.path, material_info.name); + let mut material_found: Option<&Handle> = None; + + if blenvy_config + .materials_cache + .contains_key(&material_full_path) + { + debug!("material is cached, retrieving"); + let material = blenvy_config + .materials_cache + .get(&material_full_path) + .expect("we should have the material available"); + material_found = Some(material); + } else { + let model_handle: Handle = asset_server.load(material_info.path.clone()); // FIXME: kinda weird now + let mat_gltf = assets_gltf.get(model_handle.id()).unwrap_or_else(|| panic!("materials file {} should have been preloaded", material_info.path)); + if mat_gltf + .named_materials + .contains_key(&material_info.name as &str) + { + let material = mat_gltf + .named_materials + .get(&material_info.name as &str) + .expect("this material should have been loaded at this stage, please make sure you are correctly preloading them"); + blenvy_config + .materials_cache + .insert(material_full_path, material.clone()); + material_found = Some(material); + } + } + + commands.entity(entity).insert(MaterialProcessed); + + if let Some(material) = material_found { + for child in children.iter() { + if with_materials_and_meshes.contains(*child) { + info!( + "injecting material {}, path: {:?}", + material_info.name, + material_info.path.clone() + ); + + commands.entity(*child).insert(material.clone()); + } + } + } + } +} diff --git a/crates/blenvy/src/blueprints/mod.rs b/crates/blenvy/src/blueprints/mod.rs new file mode 100644 index 0000000..d7b5ed9 --- /dev/null +++ b/crates/blenvy/src/blueprints/mod.rs @@ -0,0 +1,151 @@ +pub mod spawn_from_blueprints; +pub use spawn_from_blueprints::*; + +pub mod animation; +pub use animation::*; + +pub mod aabb; +pub use aabb::*; + +pub mod assets; +pub use assets::*; + +pub mod materials; +pub use materials::*; + +pub mod copy_components; +pub use copy_components::*; + +pub(crate) mod hot_reload; +pub(crate) use hot_reload::*; + +use bevy::{prelude::*, utils::hashbrown::HashMap}; + +use crate::{BlenvyConfig, GltfComponentsSet}; + +#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] +/// set for the two stages of blueprint based spawning : +pub enum GltfBlueprintsSet { + Spawn, + AfterSpawn, +} + +#[derive(Bundle)] +pub struct BluePrintBundle { + pub blueprint: BlueprintInfo, + pub spawn_here: SpawnBlueprint, +} +impl Default for BluePrintBundle { + fn default() -> Self { + BluePrintBundle { + blueprint: BlueprintInfo { + name: "default".into(), + path: "".into(), + }, + spawn_here: SpawnBlueprint, + } + } +} + +#[derive(Debug, Clone)] +/// Plugin for gltf blueprints +pub struct BlueprintsPlugin { + /// Automatically generate aabbs for the blueprints root objects + pub aabbs: bool, +} + +impl Default for BlueprintsPlugin { + fn default() -> Self { + Self { aabbs: false } + } +} + +fn aabbs_enabled(blenvy_config: Res) -> bool { + blenvy_config.aabbs +} + +fn hot_reload(watching_for_changes: Res) -> bool { + // println!("hot reload ? {}", watching_for_changes.0); + watching_for_changes.0 +} + +trait BlenvyApp { + fn register_watching_for_changes(&mut self) -> &mut Self; +} + +impl BlenvyApp for App { + fn register_watching_for_changes(&mut self) -> &mut Self { + let asset_server = self + .world() + .get_resource::() + .expect(ASSET_ERROR); + + let watching_for_changes = asset_server.watching_for_changes(); + self.insert_resource(WatchingForChanges(watching_for_changes)) + } +} + +#[derive(Debug, Clone, Resource, Default)] +pub(crate) struct WatchingForChanges(pub(crate) bool); +const ASSET_ERROR: &str = ""; // TODO + +impl Plugin for BlueprintsPlugin { + fn build(&self, app: &mut App) { + app.register_watching_for_changes() + .insert_resource(AssetToBlueprintInstancesMapper { + untyped_id_to_blueprint_entity_ids: HashMap::new(), + }) + .add_event::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::>() + .register_type::() + .register_type::>>() + .register_type::>>>() + .add_event::() + .register_type::() + .register_type::>() + .register_type::>() + .register_type::() + .register_type::>>() + .register_type::() + .configure_sets( + Update, + (GltfBlueprintsSet::Spawn, GltfBlueprintsSet::AfterSpawn) + .chain() + .after(GltfComponentsSet::Injection), + ) + .add_systems( + Update, + ( + blueprints_prepare_spawn, + blueprints_check_assets_loading, + blueprints_assets_loaded, + blueprints_scenes_spawned, + blueprints_cleanup_spawned_scene, + // post process + inject_materials, + compute_scene_aabbs, // .run_if(aabbs_enabled), + blueprints_finalize_instances, + ) + .chain() + .in_set(GltfBlueprintsSet::Spawn), + ) + + // animation + .add_systems( + Update, + ( + trigger_blueprint_animation_markers_events, + trigger_instance_animation_markers_events + ), + ) + // hot reload + .add_systems(Update, react_to_asset_changes.run_if(hot_reload)); + } +} diff --git a/crates/blenvy/src/blueprints/spawn_from_blueprints.rs b/crates/blenvy/src/blueprints/spawn_from_blueprints.rs new file mode 100644 index 0000000..6af9804 --- /dev/null +++ b/crates/blenvy/src/blueprints/spawn_from_blueprints.rs @@ -0,0 +1,771 @@ +use std::path::PathBuf; + +use bevy::{gltf::Gltf, prelude::*, scene::SceneInstance, utils::hashbrown::HashMap}; +use serde_json::Value; + +use crate::{ + AnimationInfos, AssetLoadTracker, AssetToBlueprintInstancesMapper, BlenvyConfig, BlueprintAnimationInfosLink, BlueprintAnimationPlayerLink, BlueprintAnimations, BlueprintAssets, BlueprintAssetsLoadState, BlueprintAssetsLoaded, BlueprintAssetsNotLoaded, SceneAnimationInfosLink, SceneAnimationPlayerLink, SceneAnimations +}; + +/// this is a flag component for our levels/game world +#[derive(Component)] +pub struct GameWorldTag; + +/// Main component for the blueprints +/// has both name & path of the blueprint to enable injecting the data from the correct blueprint +/// into the entity that contains this component +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct BlueprintInfo { + pub name: String, + pub path: String, +} +use std::path::Path; + +impl BlueprintInfo { + pub fn from_path(path: &str) -> BlueprintInfo { + let p = Path::new(&path); + return BlueprintInfo { + name: p.file_stem().unwrap().to_os_string().into_string().unwrap(), // seriously ? , also unwraps !! + path: path.into(), + }; + } +} + +/// flag component needed to signify the intent to spawn a Blueprint +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct SpawnBlueprint; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component marking any spwaned child of blueprints +pub struct FromBlueprint; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component to force adding newly spawned entity as child of game world +pub struct AddToGameWorld; + +#[derive(Component)] +/// helper component, just to transfer child data +pub(crate) struct OriginalChildren(pub Vec); + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// You can add this component to a blueprint instance, and the instance will be hidden until it is ready +/// You usually want to use this for worlds/level spawning , or dynamic spawning at runtime, but not when you are adding blueprint instances to an existing entity +/// as it would first become invisible before re-appearing again +pub struct HideUntilReady; + +#[derive(Component)] +/// marker component, gets added to all children of a currently spawning blueprint instance, can be usefull to avoid manipulating still in progress entities +pub struct BlueprintInstanceDisabled; + +#[derive(Event, Debug)] +pub enum BlueprintEvent { + /// event fired when a blueprint instance has finished loading all of its assets & before it attempts spawning + AssetsLoaded { + entity: Entity, + blueprint_name: String, + blueprint_path: String, + // TODO: add assets list ? + }, + + /// event fired when a blueprint instance has completely finished spawning, ie + /// - all its assests have been loaded + /// - all of its child blueprint instances are ready + /// - all the post processing is finished (aabb calculation, material replacements etc) + InstanceReady { + entity: Entity, + blueprint_name: String, + blueprint_path: String, + }, +} + +// TODO: move this somewhere else ? +#[derive(Component, Reflect, Debug, Default)] +#[reflect(Component)] +/// component used to mark any entity as Dynamic: aka add this to make sure your entity is going to be saved +pub struct DynamicBlueprintInstance; + +// TODO: move these somewhere else ? +#[derive(Component, Reflect, Debug, Default)] +#[reflect(Component)] +/// component gets added when a blueprint starts spawning, removed when spawning is completely done +pub struct BlueprintSpawning; + +use gltf::Gltf as RawGltf; + + + + +/* +Overview of the Blueprint Spawning process + - Blueprint Load Assets + - Blueprint Assets Ready: spawn Blueprint's scene + - Blueprint Scene Ready (SceneInstance component is present): + - get list of sub Blueprints if any, inject sub blueprints spawn tracker + - Blueprint copy components to original entity, remove useless nodes + - Blueprint post process + - generate aabb (need full hierarchy in its final form) + - inject materials from library if needed + - Blueprint Ready + - bubble information up to parent blueprint instance + - if all sub_blueprints are ready => Parent blueprint Instance is ready + => distinguish between blueprint instances inside blueprint instances vs blueprint instances inside blueprints ?? +*/ + +pub(crate) fn blueprints_prepare_spawn( + blueprint_instances_to_spawn: Query< + (Entity, &BlueprintInfo, Option<&Name>), + Added, + >, + mut commands: Commands, + asset_server: Res, + // for hot reload + mut assets_to_blueprint_instances: ResMut, + // for debug + all_names: Query<&Name> +) { + for (entity, blueprint_info, entity_name) in blueprint_instances_to_spawn.iter() { + info!( + "BLUEPRINT: to spawn detected: {:?} path:{:?}", + blueprint_info.name, blueprint_info.path + ); + //println!("all assets {:?}", all_assets); + ////////////// + // we add the asset of the blueprint itself + // TODO: add detection of already loaded data + let untyped_handle = asset_server.load_untyped(&blueprint_info.path); + let asset_id = untyped_handle.id(); + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + + let mut asset_infos: Vec = vec![]; + if !loaded { + asset_infos.push(AssetLoadTracker { + name: blueprint_info.name.clone(), + path: blueprint_info.path.clone(), + id: asset_id, + loaded: false, + handle: untyped_handle.clone(), + }); + } + + // and we also add all its assets + /* prefetch attempt */ + let gltf = RawGltf::open(format!("assets/{}", blueprint_info.path)).unwrap(); + for scene in gltf.scenes() { + if let Some(scene_extras) = scene.extras().clone() + { + let lookup: HashMap = serde_json::from_str(scene_extras.get()).unwrap(); + if lookup.contains_key("BlueprintAssets") { + let assets_raw = &lookup["BlueprintAssets"]; + //println!("ASSETS RAW {}", assets_raw); + let all_assets: BlueprintAssets = + ron::from_str(assets_raw.as_str().unwrap()).unwrap(); + // println!("all_assets {:?}", all_assets); + + for asset in all_assets.assets.iter() { + println!("ASSET {}",asset.path); + let untyped_handle = asset_server.load_untyped(&asset.path); + let asset_id = untyped_handle.id(); + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + if !loaded { + asset_infos.push(AssetLoadTracker { + name: asset.name.clone(), + path: asset.path.clone(), + id: asset_id, + loaded: false, + handle: untyped_handle.clone(), + }); + } + + // FIXME: dang, too early, asset server has not yet started loading yet + // let path_id = asset_server.get_path_id(&asset.path).expect("we should have alread checked for this asset"); + let path_id = asset.path.clone(); + // TODO: make this dependant on if hot reload is enabled or not + if !assets_to_blueprint_instances.untyped_id_to_blueprint_entity_ids.contains_key(&path_id) { + assets_to_blueprint_instances.untyped_id_to_blueprint_entity_ids.insert(path_id.clone(), vec![]); + } + // only insert if not already present in mapping + if !assets_to_blueprint_instances.untyped_id_to_blueprint_entity_ids[&path_id].contains(&entity) { + println!("adding mapping between {} and entity {:?}", path_id, all_names.get(entity)); + assets_to_blueprint_instances.untyped_id_to_blueprint_entity_ids.get_mut(&path_id).unwrap().push(entity); + } + } + } + } + } + + // now insert load tracker + // if there are assets to load + if !asset_infos.is_empty() { + commands.entity(entity).insert(( + BlueprintAssetsLoadState { + all_loaded: false, + asset_infos, + ..Default::default() + }, + BlueprintAssetsNotLoaded, + )); + } else { + commands.entity(entity).insert(BlueprintAssetsLoaded); + } + + // if the entity has no name, add one based on the blueprint's + commands + .entity(entity) + .insert(bevy::prelude::Name::from(blueprint_info.name.clone())); + // add the blueprint spawning marker + commands.entity(entity).insert(BlueprintSpawning); + } +} + +/// This system tracks & updates the loading state of all blueprints assets +pub(crate) fn blueprints_check_assets_loading( + mut blueprint_assets_to_load: Query< + (Entity, &BlueprintInfo, &mut BlueprintAssetsLoadState), + With, + >, + asset_server: Res, + mut commands: Commands, + mut blueprint_events: EventWriter, +) { + for (entity, blueprint_info, mut assets_to_load) in blueprint_assets_to_load.iter_mut() { + let mut all_loaded = true; + let mut loaded_amount = 0; + let total = assets_to_load.asset_infos.len(); + for tracker in assets_to_load.asset_infos.iter_mut() { + let asset_id = tracker.id; + let loaded = asset_server.is_loaded_with_dependencies(asset_id); + + let mut failed = false; + if let bevy::asset::LoadState::Failed(_) = asset_server.load_state(asset_id) { failed = true } + tracker.loaded = loaded || failed; + if loaded || failed { + loaded_amount += 1; + } else { + all_loaded = false; + } + } + let progress: f32 = loaded_amount as f32 / total as f32; + assets_to_load.progress = progress; + // println!("LOADING: in progress for ALL assets of {:?} (instance of {}): {} ",entity_name, blueprint_info.path, progress * 100.0); + + if all_loaded { + assets_to_load.all_loaded = true; + // println!("LOADING: DONE for ALL assets of {:?} (instance of {}), preparing for spawn", entity_name, blueprint_info.path); + blueprint_events.send(BlueprintEvent::AssetsLoaded { + entity, + blueprint_name: blueprint_info.name.clone(), + blueprint_path: blueprint_info.path.clone(), + }); + + commands + .entity(entity) + .insert(BlueprintAssetsLoaded) + .remove::() + //.remove::() //REMOVE this component in release mode/ when hot reload is off, keep it for dev/hot reload + ; + } + } +} + +pub(crate) fn blueprints_assets_loaded( + spawn_placeholders: Query< + ( + Entity, + &BlueprintInfo, + Option<&Transform>, + Option<&Parent>, + Option<&AddToGameWorld>, + Option<&Name>, + Option<&HideUntilReady>, + Option<&AnimationInfos>, + ), + ( + With, + Added, + Without, + ), + >, + all_children: Query<&Children>, + mut game_world: Query>, + assets_gltf: Res>, + asset_server: Res, + + mut graphs: ResMut>, + + mut commands: Commands, +) { + for ( + entity, + blueprint_info, + transform, + original_parent, + add_to_world, + name, + hide_until_ready, + animation_infos, + ) in spawn_placeholders.iter() + { + /*info!( + "BLUEPRINT: all assets loaded, attempting to spawn blueprint SCENE {:?} for entity {:?}, id: {:}, parent:{:?}", + blueprint_info.name, name, entity, original_parent + );*/ + + info!( + "BLUEPRINT: all assets loaded, attempting to spawn blueprint SCENE {:?} for entity {:?}, id: {}", + blueprint_info.name, name, entity + ); + + // info!("attempting to spawn {:?}", model_path); + let model_handle: Handle = asset_server.load(blueprint_info.path.clone()); // FIXME: kinda weird now + + let blueprint_gltf = assets_gltf.get(&model_handle).unwrap_or_else(|| { + panic!( + "gltf file {:?} should have been loaded", + &blueprint_info.path + ) + }); + + // WARNING we work under the assumtion that there is ONLY ONE named scene, and that the first one is the right one + let main_scene_name = blueprint_gltf + .named_scenes + .keys() + .next() + .expect("there should be at least one named scene in the gltf file to spawn"); + + let scene = &blueprint_gltf.named_scenes[main_scene_name]; + + // transforms are optional, but still deal with them correctly + let mut transforms: Transform = Transform::default(); + if transform.is_some() { + transforms = *transform.unwrap(); + } + + let mut original_children: Vec = vec![]; + if let Ok(c) = all_children.get(entity) { + for child in c.iter() { + original_children.push(*child); + } + } + + // TODO: not a fan of this + // prepare data for animations + let mut graph = AnimationGraph::new(); + let mut named_animations: HashMap> = HashMap::new(); + let mut named_indices: HashMap = HashMap::new(); + + for (key, clip) in blueprint_gltf.named_animations.iter() { + named_animations.insert(key.to_string(), clip.clone()); + let animation_index = graph.add_clip(clip.clone(), 1.0, graph.root); + named_indices.insert(key.to_string(), animation_index); + } + let graph = graphs.add(graph); + + println!("Named animations : {:?}", named_animations.keys()); + println!("ANIMATION INFOS: {:?}", animation_infos); + + commands.entity(entity).insert(( + SceneBundle { + scene: scene.clone(), + transform: transforms, + ..Default::default() + }, + OriginalChildren(original_children), + BlueprintAnimations { + // TODO: perhaps swap this out with SceneAnimations depending on whether we are spawning a level or a simple blueprint + // these are animations specific to the blueprint + named_animations, + named_indices, + graph, + }, + )); + + if original_parent.is_none() { + // only allow hiding until ready when the entity does not have a parent (?) + if hide_until_ready.is_some() { + commands.entity(entity).insert(Visibility::Hidden); // visibility: + } + + // only allow automatically adding a newly spawned blueprint instance to the "world", if the entity does not have a parent + if add_to_world.is_some() { + let world = game_world + .get_single_mut() + .expect("there should be a game world present"); + commands.entity(world).add_child(entity); + } + } + } +} + +#[derive(Component, Reflect, Debug, Default)] +#[reflect(Component)] +pub struct SubBlueprintsSpawnTracker { + pub sub_blueprint_instances: HashMap, +} + +#[derive(Component, Reflect, Debug)] +#[reflect(Component)] +pub struct SubBlueprintSpawnRoot(pub Entity); + +#[derive(Component, Reflect, Debug)] +#[reflect(Component)] +pub struct BlueprintSceneSpawned; + +#[derive(Component, Reflect, Debug)] +#[reflect(Component)] +pub struct BlueprintChildrenReady; + +pub(crate) fn blueprints_scenes_spawned( + spawned_blueprint_scene_instances: Query< + ( + Entity, + Option<&Name>, + Option<&Children>, + Option<&SubBlueprintSpawnRoot>, + ), + (With, Added), + >, + with_blueprint_infos: Query<(Entity, Option<&Name>), With>, + + all_children: Query<&Children>, + all_parents: Query<&Parent>, + + // mut sub_blueprint_trackers: Query<(Entity, &mut SubBlueprintsSpawnTracker, &BlueprintInfo)>, + mut commands: Commands, + + all_names: Query<&Name>, +) { + for (entity, name, children, track_root) in spawned_blueprint_scene_instances.iter() { + info!( + "Done spawning blueprint scene for entity named {:?} (track root: {:?})", + name, track_root + ); + let mut sub_blueprint_instances: Vec = vec![]; + let mut sub_blueprint_instance_names: Vec = vec![]; + let mut tracker_data: HashMap = HashMap::new(); + + if track_root.is_none() { + for parent in all_parents.iter_ancestors(entity) { + if with_blueprint_infos.get(parent).is_ok() { + println!( + "found a parent with blueprint_info {:?} for {:?}", + all_names.get(parent), + all_names.get(entity) + ); + commands + .entity(entity) + .insert(SubBlueprintSpawnRoot(parent)); // Injecting to know which entity is the root + break; + } + } + } + + if children.is_some() { + for child in all_children.iter_descendants(entity) { + if with_blueprint_infos.get(child).is_ok() { + // println!("Parent blueprint instance of {:?} is {:?}", all_names.get(child), all_names.get(entity)); + for parent in all_parents.iter_ancestors(child) { + if with_blueprint_infos.get(parent).is_ok() { + if parent == entity { + //println!("yohoho"); + println!( + "Parent blueprint instance of {:?} is {:?}", + all_names.get(child), + all_names.get(parent) + ); + + commands.entity(child).insert(SubBlueprintSpawnRoot(entity)); // Injecting to know which entity is the root + + tracker_data.insert(child, false); + + sub_blueprint_instances.push(child); + if let Ok(nname) = all_names.get(child) { + sub_blueprint_instance_names.push(nname.clone()); + } + /*if track_root.is_some() { + let prev_root = track_root.unwrap().0; + // if we already had a track root, and it is different from the current entity , change the previous track root's list of children + if prev_root != entity { + let mut tracker = sub_blueprint_trackers.get_mut(prev_root).expect("should have a tracker"); + tracker.1.sub_blueprint_instances.remove(&child); + } + }*/ + } + break; + } + } + } + // Mark all components as "Disabled" (until Bevy gets this as first class feature) + commands.entity(child).insert(BlueprintInstanceDisabled); + } + } + + println!("sub blueprint instances {:?}", sub_blueprint_instance_names); + + if tracker_data.keys().len() > 0 { + commands.entity(entity).insert(SubBlueprintsSpawnTracker { + sub_blueprint_instances: tracker_data.clone(), + }); + } else { + commands.entity(entity).insert(BlueprintChildrenReady); + } + } +} + +// could be done differently, by notifying each parent of a spawning blueprint that this child is done spawning ? +// perhaps using component hooks or observers (ie , if a ComponentSpawning + Parent) +use crate::CopyComponents; +use std::any::TypeId; + +#[derive(Component, Reflect, Debug)] +#[reflect(Component)] +pub struct BlueprintReadyForPostProcess; + +/// this system is in charge of doing component transfers & co +/// - it removes one level of useless nesting +/// - it copies the blueprint's root components to the entity it was spawned on (original entity) +/// - it copies the children of the blueprint scene into the original entity +/// - it adds an `AnimationLink` component containing the entity that has the `AnimationPlayer` so that animations can be controlled from the original entity +pub(crate) fn blueprints_cleanup_spawned_scene( + blueprint_scenes: Query< + ( + Entity, + &Children, + &OriginalChildren, + Option<&Name>, + &BlueprintAnimations, + ), + Added, + >, + animation_players: Query<(Entity, &Parent), With>, + all_children: Query<&Children>, + all_parents: Query<&Parent>, + with_animation_infos: Query<&AnimationInfos>, + // FIXME: meh + anims: Query<&BlueprintAnimations>, + + mut commands: Commands, + + all_names: Query<&Name>, +) { + for (original, children, original_children, name, animations) in + blueprint_scenes.iter() + { + info!("YOOO ready !! removing empty nodes {:?}", name); + + if children.len() == 0 { + warn!("timing issue ! no children found, please restart your bevy app (bug being investigated)"); + continue; + } + // the root node is the first & normally only child inside a scene, it is the one that has all relevant components + let mut blueprint_root_entity = Entity::PLACEHOLDER; //FIXME: and what about childless ones ?? => should not be possible normally + // let diff = HashSet::from_iter(original_children.0).difference(HashSet::from_iter(children)); + // we find the first child that was not in the entity before (aka added during the scene spawning) + for child in children.iter() { + if !original_children.0.contains(child) { + blueprint_root_entity = *child; + break; + } + } + + // we flag all children of the blueprint instance with 'FromBlueprint' + // can be usefull to filter out anything that came from blueprints vs normal children + for child in all_children.iter_descendants(blueprint_root_entity) { + commands.entity(child).insert(FromBlueprint); // we do this here in order to avoid doing it to normal children + } + + + // copy components into from blueprint instance's blueprint_root_entity to original entity + commands.add(CopyComponents { + source: blueprint_root_entity, + destination: original, + exclude: vec![TypeId::of::(), TypeId::of::()], + stringent: false, + }); + + // we move all of children of the blueprint instance one level to the original entity to avoid having an additional, useless nesting level + if let Ok(root_entity_children) = all_children.get(blueprint_root_entity) { + for child in root_entity_children.iter() { + // info!("copying child {:?} upward from {:?} to {:?}", names.get(*child), blueprint_root_entity, original); + commands.entity(original).add_child(*child); + } + } + + if animations.named_animations.keys().len() > 0 { + for (entity_with_player, parent) in animation_players.iter() { + if parent.get() == blueprint_root_entity { + println!( + "FOUND ANIMATION PLAYER FOR {:?} {:?} ", + all_names.get(original), + all_names.get(entity_with_player) + ); + // FIXME: stopgap solution: since we cannot use an AnimationPlayer at the root entity level + // and we cannot update animation clips so that the EntityPaths point to one level deeper, + // BUT we still want to have some marker/control at the root entity level, we add this + commands + .entity(original) + .insert((BlueprintAnimationPlayerLink(entity_with_player),)); // FIXME : this is only valid for per-blueprint logic, no per scene animations + + // since v0.14 you need both AnimationTransitions and AnimationGraph components/handle on the same entity as the animationPlayer + let transitions = AnimationTransitions::new(); + commands + .entity(entity_with_player) + .insert((transitions, animations.graph.clone())); + } + } + // VERY convoluted, but it works + for child in all_children.iter_descendants(blueprint_root_entity) { + if with_animation_infos.get(child).is_ok() { + // player is already on the same entity as the animation_infos + if animation_players.get(child).is_ok() { + println!( + "found BLUEPRINT animation player for {:?} at {:?} Root: {:?}", + all_names.get(child), + all_names.get(child), + all_names.get(original) + ); + commands + .entity(original) + .insert(( + //BlueprintAnimationPlayerLink(bla), + BlueprintAnimationInfosLink(child) + )) + ; + + } else { + for parent in all_parents.iter_ancestors(child) { + if animation_players.get(parent).is_ok() { + println!( + "found SCENE animation player for {:?} at {:?} Root: {:?}", + all_names.get(child), + all_names.get(parent), + all_names.get(original) + ); + println!("INSERTING SCENE ANIMATIONS INTO"); + let original_animations = anims.get(original).unwrap(); + commands.entity(child).insert(( + SceneAnimationPlayerLink(parent), + SceneAnimations { + named_animations: original_animations + .named_animations + .clone(), + named_indices: original_animations.named_indices.clone(), + graph: original_animations.graph.clone(), + }, + )); + } + if with_animation_infos.get(parent).is_ok() { + commands.entity(child).insert(SceneAnimationInfosLink(parent)); + + } + } + } + } + } + } + + commands + .entity(original) + .remove::() // we are done with this step, we can remove the `BlueprintChildrenReady` tag component + .insert(BlueprintReadyForPostProcess); // Tag the entity so any systems dealing with post processing can know it is now their "turn" + + commands.entity(blueprint_root_entity).despawn_recursive(); // Remove the root entity that comes from the spawned-in scene + } +} + +#[derive(Component, Reflect, Debug)] +#[reflect(Component)] +pub struct BlueprintReadyForFinalizing; + +#[derive(Component, Debug)] +/// flag component added when a Blueprint instance ist Ready : ie : +/// - its assets have loaded +/// - it has finished spawning +pub struct BlueprintInstanceReady; + +pub(crate) fn blueprints_finalize_instances( + blueprint_instances: Query< + ( + Entity, + Option<&Name>, + &BlueprintInfo, + Option<&SubBlueprintSpawnRoot>, + Option<&HideUntilReady>, + ), + (With, With), + >, + mut sub_blueprint_trackers: Query<&mut SubBlueprintsSpawnTracker, With>, + spawning_blueprints: Query<&BlueprintSpawning>, + all_children: Query<&Children>, + mut blueprint_events: EventWriter, + mut commands: Commands, + + all_names: Query<&Name> +) { + for (entity, name, blueprint_info, parent_blueprint, hide_until_ready) in + blueprint_instances.iter() + { + info!("Finalizing blueprint instance {:?}", name); + commands + .entity(entity) + .remove::() + .remove::() + .remove::() + .remove::() + //.remove::>(); // FIXME: if we delete the handle to the scene, things get despawned ! not what we want + //.remove::(); // also clear the sub assets tracker to free up handles, perhaps just freeing up the handles and leave the rest would be better ? + //.remove::(); + .insert(BlueprintInstanceReady); + + // Deal with sub blueprints + // now check if the current entity is a child blueprint instance of another entity + // this should always be done last, as children should be finished before the parent can be processed correctly + // TODO: perhaps use observers for these + if let Some(track_root) = parent_blueprint { + // only propagate sub_blueprint spawning if the parent blueprint instance ist actually in spawning mode + if spawning_blueprints.get(track_root.0).is_ok() { + if let Ok(mut tracker) = sub_blueprint_trackers.get_mut(track_root.0) { + tracker + .sub_blueprint_instances + .entry(entity) + .or_insert(true); + tracker.sub_blueprint_instances.insert(entity, true); + + // TODO: ugh, my limited rust knowledge, this is bad code + let mut all_spawned = true; + for val in tracker.sub_blueprint_instances.values() { + if !val { + all_spawned = false; + break; + } + } + if all_spawned { + + let root_name = all_names.get(track_root.0); + println!("ALLLLL SPAAAAWNED for {} named {:?}", track_root.0, root_name); + commands.entity(track_root.0).insert(BlueprintChildrenReady); + + } + } + } + } + + for child in all_children.iter_descendants(entity) { + commands.entity(child).remove::(); + } + + if hide_until_ready.is_some() { + commands.entity(entity).insert(Visibility::Visible); + } + + blueprint_events.send(BlueprintEvent::InstanceReady { + entity, + blueprint_name: blueprint_info.name.clone(), + blueprint_path: blueprint_info.path.clone(), + }); + } +} diff --git a/crates/bevy_gltf_components/src/blender_settings.rs b/crates/blenvy/src/components/blender_settings.rs similarity index 100% rename from crates/bevy_gltf_components/src/blender_settings.rs rename to crates/blenvy/src/components/blender_settings.rs diff --git a/crates/blenvy/src/components/blender_settings/lighting.rs b/crates/blenvy/src/components/blender_settings/lighting.rs new file mode 100644 index 0000000..4f3bc7f --- /dev/null +++ b/crates/blenvy/src/components/blender_settings/lighting.rs @@ -0,0 +1,182 @@ +use bevy::core_pipeline::tonemapping::Tonemapping; +use bevy::pbr::DirectionalLightShadowMap; +use bevy::prelude::*; +use bevy::render::view::{ColorGrading, ColorGradingGlobal, ColorGradingSection}; + +use crate::GltfComponentsSet; + +pub(crate) fn plugin(app: &mut App) { + app.register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .add_systems( + Update, + ( + process_lights, + process_shadowmap, + process_background_shader, + process_tonemapping, + process_colorgrading, + ) + .after(GltfComponentsSet::Injection), + ); +} + +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +/// The properties of a light's shadow , to enable controlling per light shadows from Blender +pub struct BlenderLightShadows { + pub enabled: bool, + pub buffer_bias: f32, +} + +/// The background color as described by Blender's [background shader](https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/background.html). +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +pub struct BlenderBackgroundShader { + pub color: Color, + pub strength: f32, +} + +/// The settings used by EEVEE's [shadow rendering](https://docs.blender.org/manual/en/latest/render/eevee/render_settings/shadows.html). +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +pub struct BlenderShadowSettings { + pub cascade_size: usize, +} + +/// Not all possible Blender `ToneMappings` are available in Bevy & vice versa +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +pub enum BlenderToneMapping { + #[default] + None, + AgX, + Filmic, +} + +#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] +#[reflect(Component)] +#[non_exhaustive] +pub struct BlenderColorGrading { + exposure: f32, + gamma: f32, +} + +fn process_lights( + mut directional_lights: Query< + (&mut DirectionalLight, Option<&BlenderLightShadows>), + Added, + >, + mut spot_lights: Query<(&mut SpotLight, Option<&BlenderLightShadows>), Added>, + mut point_lights: Query<(&mut PointLight, Option<&BlenderLightShadows>), Added>, +) { + for (mut light, blender_light_shadows) in directional_lights.iter_mut() { + if let Some(blender_light_shadows) = blender_light_shadows { + light.shadows_enabled = blender_light_shadows.enabled; + } + } + for (mut light, blender_light_shadows) in spot_lights.iter_mut() { + if let Some(blender_light_shadows) = blender_light_shadows { + light.shadows_enabled = blender_light_shadows.enabled; + } + } + + for (mut light, blender_light_shadows) in point_lights.iter_mut() { + if let Some(blender_light_shadows) = blender_light_shadows { + light.shadows_enabled = blender_light_shadows.enabled; + } + } +} + +fn process_shadowmap( + shadowmaps: Query<&BlenderShadowSettings, Added>, + mut commands: Commands, +) { + for shadowmap in shadowmaps.iter() { + commands.insert_resource(DirectionalLightShadowMap { + size: shadowmap.cascade_size, + }); + } +} + +fn process_background_shader( + background_shaders: Query<&BlenderBackgroundShader, Added>, + mut commands: Commands, +) { + for background_shader in background_shaders.iter() { + commands.insert_resource(AmbientLight { + color: background_shader.color, + // Just a guess, see + brightness: background_shader.strength * 400.0, + }); + commands.insert_resource(ClearColor(background_shader.color)); + } +} + +// FIXME: this logic should not depend on if toneMapping or Cameras where added first +fn process_tonemapping( + tonemappings: Query<(Entity, &BlenderToneMapping), Added>, + cameras: Query>, + mut commands: Commands, +) { + for entity in cameras.iter() { + for (scene_id, tone_mapping) in tonemappings.iter() { + match tone_mapping { + BlenderToneMapping::None => { + //println!("TONEMAPPING NONE"); + commands.entity(entity).remove::(); + } + BlenderToneMapping::AgX => { + //println!("TONEMAPPING Agx"); + commands.entity(entity).insert(Tonemapping::AgX); + } + BlenderToneMapping::Filmic => { + //println!("TONEMAPPING Filmic"); + commands.entity(entity).insert(Tonemapping::BlenderFilmic); + } + } + commands.entity(scene_id).remove::(); + } + } +} + +// FIXME: this logic should not depend on if toneMapping or Cameras where added first +fn process_colorgrading( + blender_colorgradings: Query<(Entity, &BlenderColorGrading), Added>, + cameras: Query>, + mut commands: Commands, +) { + for entity in cameras.iter() { + for (scene_id, blender_colorgrading) in blender_colorgradings.iter() { + info!("COLOR GRADING"); + commands.entity(entity).insert(ColorGrading { + global: ColorGradingGlobal { + exposure: blender_colorgrading.exposure, + ..Default::default() + }, + shadows: ColorGradingSection { + gamma: blender_colorgrading.gamma, + ..Default::default() + }, + midtones: ColorGradingSection { + gamma: blender_colorgrading.gamma, + ..Default::default() + }, + highlights: ColorGradingSection { + gamma: blender_colorgrading.gamma, + ..Default::default() + }, + + ..Default::default() + }); + commands.entity(scene_id).remove::(); + } + } +} diff --git a/crates/bevy_gltf_components/src/lib.rs b/crates/blenvy/src/components/mod.rs similarity index 66% rename from crates/bevy_gltf_components/src/lib.rs rename to crates/blenvy/src/components/mod.rs index ccba12f..c34212b 100644 --- a/crates/bevy_gltf_components/src/lib.rs +++ b/crates/blenvy/src/components/mod.rs @@ -10,13 +10,7 @@ pub use process_gltfs::*; pub mod blender_settings; use bevy::{ - app::Startup, - ecs::{ - component::Component, - reflect::ReflectComponent, - system::{Res, Resource}, - }, - log::warn, + ecs::{component::Component, reflect::ReflectComponent}, prelude::{App, IntoSystemConfigs, Plugin, SystemSet, Update}, reflect::Reflect, }; @@ -29,7 +23,7 @@ use bevy::{ /// # use bevy::gltf::*; /// # use bevy_gltf_components::ComponentsFromGltfPlugin; /// -/// //too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blender_bevy_components_workflow/examples/basic for a real example +/// //too barebones of an example to be meaningfull, please see https://github.com/kaosat-dev/Blenvy/examples/basic for a real example /// fn main() { /// App::new() /// .add_plugins(DefaultPlugins) @@ -65,35 +59,13 @@ pub enum GltfComponentsSet { Injection, } -#[derive(Clone, Resource)] -pub struct GltfComponentsConfig { - pub(crate) legacy_mode: bool, -} - -pub struct ComponentsFromGltfPlugin { - pub legacy_mode: bool, -} - -impl Default for ComponentsFromGltfPlugin { - fn default() -> Self { - Self { legacy_mode: true } - } -} - -fn check_for_legacy_mode(gltf_components_config: Res) { - if gltf_components_config.legacy_mode { - warn!("using simplified component definitions is deprecated since 0.3, prefer defining components with real ron values (use the bevy_components tool for Blender for simplicity) "); - } -} +#[derive(Default)] +pub struct ComponentsFromGltfPlugin {} impl Plugin for ComponentsFromGltfPlugin { fn build(&self, app: &mut App) { app.add_plugins(blender_settings::plugin) .register_type::() - .insert_resource(GltfComponentsConfig { - legacy_mode: self.legacy_mode, - }) - .add_systems(Startup, check_for_legacy_mode) .add_systems( Update, (add_components_from_gltf_extras).in_set(GltfComponentsSet::Injection), diff --git a/crates/blenvy/src/components/process_gltfs.rs b/crates/blenvy/src/components/process_gltfs.rs new file mode 100644 index 0000000..4e5b176 --- /dev/null +++ b/crates/blenvy/src/components/process_gltfs.rs @@ -0,0 +1,157 @@ +use bevy::{ + core::Name, + ecs::{ + entity::Entity, + query::{Added, Without}, + reflect::{AppTypeRegistry, ReflectComponent}, + world::World, + }, + gltf::{GltfExtras, GltfMaterialExtras, GltfMeshExtras, GltfSceneExtras}, + hierarchy::Parent, + log::debug, + reflect::{Reflect, TypeRegistration}, + utils::HashMap, +}; + +use crate::{ronstring_to_reflect_component, GltfProcessed}; + +// , mut entity_components: HashMap, TypeRegistration)>> +fn find_entity_components( + entity: Entity, + name: Option<&Name>, + parent: Option<&Parent>, + reflect_components: Vec<(Box, TypeRegistration)>, + entity_components: &HashMap, TypeRegistration)>>, +) -> (Entity, Vec<(Box, TypeRegistration)>) { + // we assign the components specified /xxx_components objects to their parent node + let mut target_entity = entity; + // if the node contains "components" or ends with "_pa" (ie add to parent), the components will not be added to the entity itself but to its parent + // this is mostly used for Blender collections + if parent.is_some() { + if let Some(name) = name { + if name.as_str().contains("components") || name.as_str().ends_with("_pa") { + debug!("adding components to parent"); + target_entity = parent.expect("the target entity had a parent ").get(); + } + } + } + debug!("adding to {:?}", target_entity); + + // if there where already components set to be added to this entity (for example when entity_data was refering to a parent), update the vec of entity_components accordingly + // this allows for example blender collection to provide basic ecs data & the instances to override/ define their own values + if entity_components.contains_key(&target_entity) { + let mut updated_components: Vec<(Box, TypeRegistration)> = Vec::new(); + let current_components = &entity_components[&target_entity]; + // first inject the current components + for (component, type_registration) in current_components { + updated_components.push((component.clone_value(), type_registration.clone())); + } + // then inject the new components: this also enables overwrite components set in the collection + for (component, type_registration) in reflect_components { + updated_components.push((component.clone_value(), type_registration)); + } + return (target_entity, updated_components); + } + (target_entity, reflect_components) +} + +/// main function: injects components into each entity in gltf files that have `gltf_extras`, using reflection +pub fn add_components_from_gltf_extras(world: &mut World) { + let mut extras = world.query_filtered::<(Entity, Option<&Name>, &GltfExtras, Option<&Parent>), (Added, Without)>(); + let mut scene_extras = world.query_filtered::<(Entity, Option<&Name>, &GltfSceneExtras, Option<&Parent>), (Added, Without)>(); + let mut mesh_extras = world.query_filtered::<(Entity, Option<&Name>, &GltfMeshExtras, Option<&Parent>), (Added, Without)>(); + let mut material_extras = world.query_filtered::<(Entity, Option<&Name>, &GltfMaterialExtras, Option<&Parent>), (Added, Without)>(); + + let mut entity_components: HashMap, TypeRegistration)>> = + HashMap::new(); + + // let gltf_components_config = world.resource::(); + + for (entity, name, extra, parent) in extras.iter(world) { + debug!( + "Gltf Extra: Name: {:?}, entity {:?}, parent: {:?}, extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + // let name = name.unwrap_or(&Name::new("")); + + let (target_entity, updated_components) = + find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, name, extra, parent) in scene_extras.iter(world) { + debug!( + "Gltf Scene Extra: Name: {:?}, entity {:?}, parent: {:?}, scene_extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + + let (target_entity, updated_components) = + find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, name, extra, parent) in mesh_extras.iter(world) { + debug!( + "Gltf Mesh Extra: Name: {:?}, entity {:?}, parent: {:?}, mesh_extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + + let (target_entity, updated_components) = + find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, name, extra, parent) in material_extras.iter(world) { + debug!( + "Name: {:?}, entity {:?}, parent: {:?}, material_extras {:?}", + name, entity, parent, extra + ); + + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.read(); + let reflect_components = ronstring_to_reflect_component(&extra.value, &type_registry); + + let (target_entity, updated_components) = + find_entity_components(entity, name, parent, reflect_components, &entity_components); + entity_components.insert(target_entity, updated_components); + } + + for (entity, components) in entity_components { + let type_registry: &AppTypeRegistry = world.resource(); + let type_registry = type_registry.clone(); + let type_registry = type_registry.read(); + + if !components.is_empty() { + debug!("--entity {:?}, components {}", entity, components.len()); + } + for (component, type_registration) in components { + debug!( + "------adding {} {:?}", + component.get_represented_type_info().unwrap().type_path(), + component + ); + + { + let mut entity_mut = world.entity_mut(entity); + type_registration + .data::() + .expect("Unable to reflect component") + .insert(&mut entity_mut, &*component, &type_registry); + + entity_mut.insert(GltfProcessed); // + } + } + } +} diff --git a/crates/blenvy/src/components/ronstring_to_reflect_component.rs b/crates/blenvy/src/components/ronstring_to_reflect_component.rs new file mode 100644 index 0000000..faf2cf7 --- /dev/null +++ b/crates/blenvy/src/components/ronstring_to_reflect_component.rs @@ -0,0 +1,133 @@ +use bevy::log::{debug, warn}; +use bevy::reflect::serde::ReflectDeserializer; +use bevy::reflect::{Reflect, TypeRegistration, TypeRegistry}; +use bevy::utils::HashMap; +use ron::Value; +use serde::de::DeserializeSeed; + +use super::capitalize_first_letter; + +pub fn ronstring_to_reflect_component( + ron_string: &str, + type_registry: &TypeRegistry, +) -> Vec<(Box, TypeRegistration)> { + let lookup: HashMap = ron::from_str(ron_string).unwrap(); + let mut components: Vec<(Box, TypeRegistration)> = Vec::new(); + // println!("ron_string {:?}", ron_string); + for (name, value) in lookup.into_iter() { + let parsed_value: String = match value.clone() { + Value::String(str) => str, + _ => ron::to_string(&value).unwrap().to_string(), + }; + + if name.as_str() == "bevy_components" { + bevy_components_string_to_components(parsed_value, type_registry, &mut components); + } else { + components_string_to_components( + name, + value, + parsed_value, + type_registry, + &mut components, + ); + } + } + components +} + +fn components_string_to_components( + name: String, + value: Value, + parsed_value: String, + type_registry: &TypeRegistry, + components: &mut Vec<(Box, TypeRegistration)>, +) { + let type_string = name.replace("component: ", "").trim().to_string(); + let capitalized_type_name = capitalize_first_letter(type_string.as_str()); + + if let Some(type_registration) = + type_registry.get_with_short_type_path(capitalized_type_name.as_str()) + { + debug!("TYPE INFO {:?}", type_registration.type_info()); + + let ron_string = format!( + "{{ \"{}\":{} }}", + type_registration.type_info().type_path(), + parsed_value + ); + + /* + // usefull to determine what an entity looks like Serialized + let test_struct = Color::Srgba(Srgba { red: 0.2, green: 0.2, blue: 0.2, alpha: 0.2 }); + //CameraRenderGraph::new("name"); + let serializer = ReflectSerializer::new(&test_struct, &type_registry); + let serialized = + ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap(); + println!("serialized Component {}", serialized); + */ + + debug!("component data ron string {}", ron_string); + let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()) + .expect("deserialzer should have been generated from string"); + let reflect_deserializer = ReflectDeserializer::new(type_registry); + let component = reflect_deserializer + .deserialize(&mut deserializer) + .unwrap_or_else(|_| { + panic!( + "failed to deserialize component {} with value: {:?}", + name, value + ) + }); + + debug!("component {:?}", component); + debug!("real type {:?}", component.get_represented_type_info()); + components.push((component, type_registration.clone())); + debug!("found type registration for {}", capitalized_type_name); + } else { + warn!("no type registration for {}", capitalized_type_name); + } +} + +fn bevy_components_string_to_components( + parsed_value: String, + type_registry: &TypeRegistry, + components: &mut Vec<(Box, TypeRegistration)>, +) { + let lookup: HashMap = ron::from_str(&parsed_value).unwrap(); + for (key, value) in lookup.into_iter() { + let parsed_value: String = match value.clone() { + Value::String(str) => str, + _ => ron::to_string(&value).unwrap().to_string(), + }; + + if let Some(type_registration) = type_registry.get_with_type_path(key.as_str()) { + debug!("TYPE INFO {:?}", type_registration.type_info()); + + let ron_string = format!( + "{{ \"{}\":{} }}", + type_registration.type_info().type_path(), + parsed_value + ); + + debug!("component data ron string {}", ron_string); + let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()) + .expect("deserialzer should have been generated from string"); + let reflect_deserializer = ReflectDeserializer::new(type_registry); + let component = reflect_deserializer + .deserialize(&mut deserializer) + .unwrap_or_else(|_| { + panic!( + "failed to deserialize component {} with value: {:?}", + key, value + ) + }); + + debug!("component {:?}", component); + debug!("real type {:?}", component.get_represented_type_info()); + components.push((component, type_registration.clone())); + debug!("found type registration for {}", key); + } else { + warn!("no type registration for {}", key); + } + } +} diff --git a/crates/bevy_gltf_components/src/utils.rs b/crates/blenvy/src/components/utils.rs similarity index 100% rename from crates/bevy_gltf_components/src/utils.rs rename to crates/blenvy/src/components/utils.rs diff --git a/crates/blenvy/src/lib.rs b/crates/blenvy/src/lib.rs new file mode 100644 index 0000000..01bc10b --- /dev/null +++ b/crates/blenvy/src/lib.rs @@ -0,0 +1,82 @@ +use bevy::{prelude::*, render::primitives::Aabb, utils::HashMap}; +use std::path::PathBuf; + +pub mod components; +pub use components::*; + +pub mod registry; +pub use registry::*; + +pub mod blueprints; +pub use blueprints::*; + +#[derive(Clone, Resource)] +pub struct BlenvyConfig { + // registry + pub(crate) registry_save_path: PathBuf, + pub(crate) registry_component_filter: SceneFilter, + #[allow(dead_code)] + pub(crate) registry_resource_filter: SceneFilter, + + // blueprints + pub(crate) aabbs: bool, + pub(crate) aabb_cache: HashMap, // cache for aabbs + pub(crate) materials_cache: HashMap>, // cache for materials + + // save & load + pub(crate) save_component_filter: SceneFilter, + pub(crate) save_resource_filter: SceneFilter, +} + +#[derive(Debug, Clone)] +/// Plugin for gltf blueprints +pub struct BlenvyPlugin { + pub registry_save_path: PathBuf, + + pub registry_component_filter: SceneFilter, + pub registry_resource_filter: SceneFilter, + + /// Automatically generate aabbs for the blueprints root objects + pub aabbs: bool, + + // for save & load + pub save_component_filter: SceneFilter, + pub save_resource_filter: SceneFilter, +} + +impl Default for BlenvyPlugin { + fn default() -> Self { + Self { + registry_save_path: PathBuf::from("registry.json"), // relative to assets folder + registry_component_filter: SceneFilter::default(), + registry_resource_filter: SceneFilter::default(), + aabbs: false, + + save_component_filter: SceneFilter::default(), + save_resource_filter: SceneFilter::default(), + } + } +} + +impl Plugin for BlenvyPlugin { + fn build(&self, app: &mut App) { + app.add_plugins(( + ComponentsFromGltfPlugin::default(), + ExportRegistryPlugin::default(), + BlueprintsPlugin::default(), + )) + .insert_resource(BlenvyConfig { + registry_save_path: self.registry_save_path.clone(), + registry_component_filter: self.registry_component_filter.clone(), + registry_resource_filter: self.registry_resource_filter.clone(), + + aabbs: self.aabbs, + aabb_cache: HashMap::new(), + + materials_cache: HashMap::new(), + + save_component_filter: self.save_component_filter.clone(), + save_resource_filter: self.save_resource_filter.clone() + }); + } +} diff --git a/crates/bevy_registry_export/src/export_types.rs b/crates/blenvy/src/registry/export_types.rs similarity index 83% rename from crates/bevy_registry_export/src/export_types.rs rename to crates/blenvy/src/registry/export_types.rs index 8a06ebf..44dda82 100644 --- a/crates/bevy_registry_export/src/export_types.rs +++ b/crates/blenvy/src/registry/export_types.rs @@ -1,40 +1,47 @@ -use std::{fs::File, path::Path}; - -use bevy::log::info; -use bevy_ecs::{ - reflect::{AppTypeRegistry, ReflectComponent, ReflectResource}, - world::World, +use crate::{AssetRoot, BlenvyConfig}; +use bevy::{ + log::info, + prelude::{AppTypeRegistry, ReflectComponent, ReflectResource, World}, + reflect::{TypeInfo, TypeRegistration, VariantInfo}, }; -use bevy_reflect::{TypeInfo, TypeRegistration, VariantInfo}; // TypePath // DynamicTypePath use serde_json::{json, Map, Value}; - -use crate::{AssetRoot, ExportComponentsConfig}; +use std::{fs::File, path::Path}; pub fn export_types(world: &mut World) { let config = world - .get_resource::() + .get_resource::() .expect("ExportComponentsConfig should exist at this stage"); let asset_root = world.resource::(); - let registry_save_path = Path::join(&asset_root.0, &config.save_path); - println!("registry_save_path {}", registry_save_path.display()); + let registry_save_path = Path::join(&asset_root.0, &config.registry_save_path); let writer = File::create(registry_save_path).expect("should have created schema file"); + let components_to_filter_out = &config.registry_component_filter.clone(); + let resources_to_filter_out = &config.registry_resource_filter.clone(); + let types = world.resource_mut::(); let types = types.read(); - let schemas = types.iter().map(export_type).collect::>(); + let schemas = types + .iter() + .filter(|type_info| { + let type_id = type_info.type_id(); + components_to_filter_out.is_allowed_by_id(type_id) + && resources_to_filter_out.is_allowed_by_id(type_id) + }) + .map(export_type) + .collect::>(); serde_json::to_writer_pretty( writer, &json!({ "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "bevy component registry schema", + "long_name": "bevy component registry schema", "$defs": schemas, }), ) .expect("valid json"); - info!("Done exporting registry schema") + info!("Done exporting registry schema"); } pub fn export_type(reg: &TypeRegistration) -> (String, Value) { @@ -57,7 +64,7 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { json!({ "type": "object", "typeInfo": "Struct", - "title": t.type_path(), + "long_name": t.type_path(), "properties": properties, "additionalProperties": false, "required": info @@ -75,7 +82,7 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { json!({ "type": "string", "typeInfo": "Enum", - "title": t.type_path(), + "long_name": t.type_path(), "oneOf": info .iter() .map(|variant| match variant { @@ -94,12 +101,12 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { VariantInfo::Struct(v) => json!({ "type": "object", "typeInfo": "Struct", - "title": v.name(), + "long_name": v.name(), "short_name": v.name().split("::").last().unwrap_or(v.name()), "properties": v .iter() .enumerate() - .map(|(variant_idx, field)| (field.name().to_owned(), add_min_max(json!({"type": typ(field.type_path()), "title": field.name()}), reg, field_idx, Some(variant_idx)))) + .map(|(variant_idx, field)| (field.name().to_owned(), add_min_max(json!({"type": typ(field.type_path()), "long_name": field.name()}), reg, field_idx, Some(variant_idx)))) .collect::>(), "additionalProperties": false, "required": v @@ -111,7 +118,7 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { VariantInfo::Tuple(v) => json!({ "type": "array", "typeInfo": "Tuple", - "title": v.name(), + "long_name": v.name(), "short_name":v.name(), "prefixItems": v .iter() @@ -121,7 +128,7 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { "items": false, }), VariantInfo::Unit(v) => json!({ - "title": v.name(), + "long_name": v.name(), }), }) .collect::>(); @@ -129,13 +136,13 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { json!({ "type": "object", "typeInfo": "Enum", - "title": t.type_path(), + "long_name": t.type_path(), "oneOf": variants, }) } } TypeInfo::TupleStruct(info) => json!({ - "title": t.type_path(), + "long_name": t.type_path(), "type": "array", "typeInfo": "TupleStruct", "prefixItems": info @@ -147,26 +154,27 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { }), TypeInfo::List(info) => { json!({ - "title": t.type_path(), + "long_name": t.type_path(), "type": "array", "typeInfo": "List", "items": json!({"type": typ(info.item_type_path_table().path())}), }) } TypeInfo::Array(info) => json!({ - "title": t.type_path(), + "long_name": t.type_path(), "type": "array", "typeInfo": "Array", "items": json!({"type": typ(info.item_type_path_table().path())}), }), TypeInfo::Map(info) => json!({ - "title": t.type_path(), + "long_name": t.type_path(), "type": "object", "typeInfo": "Map", - "additionalProperties": json!({"type": typ(info.value_type_path_table().path())}), + "valueType": json!({"type": typ(info.value_type_path_table().path())}), + "keyType": json!({"type": typ(info.key_type_path_table().path())}), }), TypeInfo::Tuple(info) => json!({ - "title": t.type_path(), + "long_name": t.type_path(), "type": "array", "typeInfo": "Tuple", "prefixItems": info @@ -177,7 +185,7 @@ pub fn export_type(reg: &TypeRegistration) -> (String, Value) { "items": false, }), TypeInfo::Value(info) => json!({ - "title": t.type_path(), + "long_name": t.type_path(), "type": map_json_type(info.type_path()), "typeInfo": "Value", }), diff --git a/crates/bevy_registry_export/src/lib.rs b/crates/blenvy/src/registry/mod.rs similarity index 62% rename from crates/bevy_registry_export/src/lib.rs rename to crates/blenvy/src/registry/mod.rs index eef5136..12dcc46 100644 --- a/crates/bevy_registry_export/src/lib.rs +++ b/crates/blenvy/src/registry/mod.rs @@ -1,26 +1,15 @@ -pub mod export_types; use std::path::PathBuf; -use bevy_app::Startup; -use bevy_ecs::system::Resource; +pub mod export_types; pub use export_types::*; use bevy::{ + app::Startup, asset::AssetPlugin, - prelude::{App, Plugin}, + prelude::{App, Plugin, Resource}, scene::SceneFilter, }; -// Plugin configuration -#[derive(Clone, Resource)] -pub struct ExportComponentsConfig { - pub(crate) save_path: PathBuf, - #[allow(dead_code)] - pub(crate) component_filter: SceneFilter, // unused for now - #[allow(dead_code)] - pub(crate) resource_filter: SceneFilter, // unused for now -} - pub struct ExportRegistryPlugin { pub component_filter: SceneFilter, pub resource_filter: SceneFilter, @@ -30,8 +19,8 @@ pub struct ExportRegistryPlugin { impl Default for ExportRegistryPlugin { fn default() -> Self { Self { - component_filter: SceneFilter::default(), // unused for now - resource_filter: SceneFilter::default(), // unused for now + component_filter: SceneFilter::default(), + resource_filter: SceneFilter::default(), save_path: PathBuf::from("registry.json"), // relative to assets folder } } @@ -39,13 +28,7 @@ impl Default for ExportRegistryPlugin { impl Plugin for ExportRegistryPlugin { fn build(&self, app: &mut App) { - app.register_asset_root() - .insert_resource(ExportComponentsConfig { - save_path: self.save_path.clone(), - component_filter: self.component_filter.clone(), - resource_filter: self.resource_filter.clone(), - }) - .add_systems(Startup, export_types); + app.register_asset_root().add_systems(Startup, export_types); } } diff --git a/crates/bevy_gltf_save_load/src/loading.rs b/crates/blenvy/src/save_load/loading.rs similarity index 100% rename from crates/bevy_gltf_save_load/src/loading.rs rename to crates/blenvy/src/save_load/loading.rs diff --git a/crates/bevy_gltf_save_load/src/lib.rs b/crates/blenvy/src/save_load/mod.rs similarity index 100% rename from crates/bevy_gltf_save_load/src/lib.rs rename to crates/blenvy/src/save_load/mod.rs diff --git a/crates/bevy_gltf_save_load/src/saveable.rs b/crates/blenvy/src/save_load/saveable.rs similarity index 100% rename from crates/bevy_gltf_save_load/src/saveable.rs rename to crates/blenvy/src/save_load/saveable.rs diff --git a/crates/bevy_gltf_save_load/src/saving.rs b/crates/blenvy/src/save_load/saving.rs similarity index 100% rename from crates/bevy_gltf_save_load/src/saving.rs rename to crates/blenvy/src/save_load/saving.rs diff --git a/examples/README.md b/examples/README.md index a1b00b0..3a63787 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,4 @@ # Examples -This folder contains numerous examples showing how to use both bevy_gltf_components and bevy_gltf_blueprints. -Each example is its own crate so its dependencies are specific & clear. \ No newline at end of file +This folder contains numerous examples showing how to use Blenvy +Each example is its own crate so its dependencies and assets are specific & clear. \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/animation/Cargo.toml b/examples/bevy_gltf_blueprints/animation/Cargo.toml deleted file mode 100644 index eb35ecd..0000000 --- a/examples/bevy_gltf_blueprints/animation/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "bevy_gltf_blueprints_animation_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -rand = "0.8.5" diff --git a/examples/bevy_gltf_blueprints/animation/assets/assets_game.assets.ron b/examples/bevy_gltf_blueprints/animation/assets/assets_game.assets.ron deleted file mode 100644 index 31015e9..0000000 --- a/examples/bevy_gltf_blueprints/animation/assets/assets_game.assets.ron +++ /dev/null @@ -1,6 +0,0 @@ -({ - "world":File (path: "models/Level1.glb"), - "models": Folder ( - path: "models/library", - ), -}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/Level1.glb b/examples/bevy_gltf_blueprints/animation/assets/models/Level1.glb deleted file mode 100644 index 7ed4887..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/Level1.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/animation.glb b/examples/bevy_gltf_blueprints/animation/assets/models/animation.glb deleted file mode 100644 index 64d3372..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/animation.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/Container.glb b/examples/bevy_gltf_blueprints/animation/assets/models/library/Container.glb deleted file mode 100644 index e0078e7..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/library/Container.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/Health_Pickup.glb b/examples/bevy_gltf_blueprints/animation/assets/models/library/Health_Pickup.glb deleted file mode 100644 index c88b00d..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/library/Health_Pickup.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/MagicTeapot.glb b/examples/bevy_gltf_blueprints/animation/assets/models/library/MagicTeapot.glb deleted file mode 100644 index b757818..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/library/MagicTeapot.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/Player.glb b/examples/bevy_gltf_blueprints/animation/assets/models/library/Player.glb deleted file mode 100644 index 139ac30..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/library/Player.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/Wheelbot.glb b/examples/bevy_gltf_blueprints/animation/assets/models/library/Wheelbot.glb deleted file mode 100644 index 25c8168..0000000 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/library/Wheelbot.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/animation/src/core/mod.rs b/examples/bevy_gltf_blueprints/animation/src/core/mod.rs deleted file mode 100644 index 6db036e..0000000 --- a/examples/bevy_gltf_blueprints/animation/src/core/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::*; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins((BlueprintsPlugin { - library_folder: "models/library".into(), - format: GltfFormat::GLB, - aabbs: true, - ..Default::default() - },)); - } -} diff --git a/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs b/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs deleted file mode 100644 index 05a94a9..0000000 --- a/examples/bevy_gltf_blueprints/animation/src/game/in_game.rs +++ /dev/null @@ -1,312 +0,0 @@ -use bevy_gltf_worlflow_examples_common_rapier::{ - assets::GameAssets, GameState, InAppRunning, Player, -}; -use bevy_rapier3d::prelude::Velocity; -use rand::Rng; -use std::time::Duration; - -use bevy::prelude::*; - -use bevy_gltf_blueprints::{ - AnimationPlayerLink, Animations, BluePrintBundle, BlueprintName, GameWorldTag, -}; - -use super::{Fox, Robot}; - -pub fn setup_game( - mut commands: Commands, - game_assets: Res, - models: Res>, - - mut next_game_state: ResMut>, -) { - commands.insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 0.2, - }); - // here we actually spawn our game world/level - - commands.spawn(( - SceneBundle { - // note: because of this issue https://github.com/bevyengine/bevy/issues/10436, "world" is now a gltf file instead of a scene - scene: models - .get(game_assets.world.clone().unwrap().id()) - .expect("main level should have been loaded") - .scenes[0] - .clone(), - ..default() - }, - bevy::prelude::Name::from("world"), - GameWorldTag, - InAppRunning, - )); - - next_game_state.set(GameState::InGame) -} - -pub fn spawn_test( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::KeyT) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 8.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Fox".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("Spawned{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 0.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} - -// example of changing animation of entities based on proximity to the player, for "fox" entities (Tag component) -pub fn animation_change_on_proximity_foxes( - players: Query<&GlobalTransform, With>, - animated_foxes: Query<(&GlobalTransform, &AnimationPlayerLink, &Animations), With>, - - mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>, -) { - for player_transforms in players.iter() { - for (fox_tranforms, link, animations) in animated_foxes.iter() { - let distance = player_transforms - .translation() - .distance(fox_tranforms.translation()); - let mut anim_name = "Walk"; - if distance < 8.5 { - anim_name = "Run"; - } else if (8.5..10.0).contains(&distance) { - anim_name = "Walk"; - } else if (10.0..15.0).contains(&distance) { - anim_name = "Survey"; - } - // now play the animation based on the chosen animation name - let (mut animation_player, mut animation_transitions) = - animation_players.get_mut(link.0).unwrap(); - animation_transitions - .play( - &mut animation_player, - *animations - .named_indices - .get(anim_name) - .expect("animation name should be in the list"), - Duration::from_secs(3), - ) - .repeat(); - } - } -} - -// example of changing animation of entities based on proximity to the player, this time for the "robot" entities (Tag component) -pub fn animation_change_on_proximity_robots( - players: Query<&GlobalTransform, With>, - animated_robots: Query<(&GlobalTransform, &AnimationPlayerLink, &Animations), With>, - - mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>, -) { - for player_transforms in players.iter() { - for (robot_tranforms, link, animations) in animated_robots.iter() { - let distance = player_transforms - .translation() - .distance(robot_tranforms.translation()); - - let mut anim_name = "Idle"; - if distance < 8.5 { - anim_name = "Jump"; - } else if (8.5..10.0).contains(&distance) { - anim_name = "Scan"; - } else if (10.0..15.0).contains(&distance) { - anim_name = "Idle"; - } - - // now play the animation based on the chosen animation name - let (mut animation_player, mut animation_transitions) = - animation_players.get_mut(link.0).unwrap(); - animation_transitions - .play( - &mut animation_player, - *animations - .named_indices - .get(anim_name) - .expect("animation name should be in the list"), - Duration::from_secs(3), - ) - .repeat(); - } - } -} - -pub fn animation_control( - animated_enemies: Query<(&AnimationPlayerLink, &Animations), With>, - animated_foxes: Query<(&AnimationPlayerLink, &Animations), With>, - - mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>, - - keycode: Res>, - // mut entities_with_animations : Query<(&mut AnimationPlayer, &mut Animations)>, -) { - // robots - if keycode.just_pressed(KeyCode::KeyB) { - for (link, animations) in animated_enemies.iter() { - let (mut animation_player, mut animation_transitions) = - animation_players.get_mut(link.0).unwrap(); - let anim_name = "Scan"; - animation_transitions - .play( - &mut animation_player, - *animations - .named_indices - .get(anim_name) - .expect("animation name should be in the list"), - Duration::from_secs(5), - ) - .repeat(); - } - } - - // foxes - if keycode.just_pressed(KeyCode::KeyW) { - for (link, animations) in animated_foxes.iter() { - let (mut animation_player, mut animation_transitions) = - animation_players.get_mut(link.0).unwrap(); - let anim_name = "Walk"; - animation_transitions - .play( - &mut animation_player, - *animations - .named_indices - .get(anim_name) - .expect("animation name should be in the list"), - Duration::from_secs(5), - ) - .repeat(); - } - } - - if keycode.just_pressed(KeyCode::KeyX) { - for (link, animations) in animated_foxes.iter() { - let (mut animation_player, mut animation_transitions) = - animation_players.get_mut(link.0).unwrap(); - let anim_name = "Run"; - animation_transitions - .play( - &mut animation_player, - *animations - .named_indices - .get(anim_name) - .expect("animation name should be in the list"), - Duration::from_secs(5), - ) - .repeat(); - } - } - - if keycode.just_pressed(KeyCode::KeyC) { - for (link, animations) in animated_foxes.iter() { - let (mut animation_player, mut animation_transitions) = - animation_players.get_mut(link.0).unwrap(); - let anim_name = "Survey"; - animation_transitions - .play( - &mut animation_player, - *animations - .named_indices - .get(anim_name) - .expect("animation name should be in the list"), - Duration::from_secs(5), - ) - .repeat(); - } - } - - /* Improveement ideas for the future - // a bit more ideal API - if keycode.just_pressed(KeyCode::B) { - for (animation_player, animations) in animated_enemies.iter() { - let anim_name = "Scan"; - if animations.named_animations.contains_key(anim_name) { - let clip = animations.named_animations.get(anim_name).unwrap(); - animation_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); - } - } - } - - // even better API - if keycode.just_pressed(KeyCode::B) { - for (animation_player, animations) in animated_enemies.iter() { - animation_player.play_with_transition("Scan", Duration::from_secs(5)).repeat(); // with a merged animationPlayer + animations storage - // alternative, perhaps more realistic, and better seperation of concerns - animation_player.play_with_transition(animations, "Scan", Duration::from_secs(5)).repeat(); - - } - }*/ - - /*for (mut anim_player, animations) in entities_with_animations.iter_mut(){ - - if keycode.just_pressed(KeyCode::W) { - let anim_name = "Walk"; - if animations.named_animations.contains_key(anim_name) { - let clip = animations.named_animations.get(anim_name).unwrap(); - anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); - } - } - if keycode.just_pressed(KeyCode::X) { - let anim_name = "Run"; - if animations.named_animations.contains_key(anim_name) { - let clip = animations.named_animations.get(anim_name).unwrap(); - anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); - } - } - if keycode.just_pressed(KeyCode::C) { - let anim_name = "Survey"; - if animations.named_animations.contains_key(anim_name) { - let clip = animations.named_animations.get(anim_name).unwrap(); - anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); - } - } - - - - if keycode.just_pressed(KeyCode::S) { - let anim_name = "Scan"; - if animations.named_animations.contains_key(anim_name) { - let clip = animations.named_animations.get(anim_name).unwrap(); - anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); - } - } - if keycode.just_pressed(KeyCode::I) { - let anim_name = "Idle"; - if animations.named_animations.contains_key(anim_name) { - let clip = animations.named_animations.get(anim_name).unwrap(); - anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); - } - } - }*/ -} diff --git a/examples/bevy_gltf_blueprints/animation/src/game/mod.rs b/examples/bevy_gltf_blueprints/animation/src/game/mod.rs deleted file mode 100644 index 2520bad..0000000 --- a/examples/bevy_gltf_blueprints/animation/src/game/mod.rs +++ /dev/null @@ -1,40 +0,0 @@ -pub mod in_game; -pub use in_game::*; - -pub mod in_main_menu; -pub use in_main_menu::*; - -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// Demo marker component -pub struct Fox; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// Demo marker component -pub struct Robot; - -pub struct GamePlugin; -impl Plugin for GamePlugin { - fn build(&self, app: &mut App) { - app.register_type::() - .register_type::() - .add_systems( - Update, - ( - spawn_test, - animation_control, - animation_change_on_proximity_foxes, - animation_change_on_proximity_robots, - ) - .run_if(in_state(GameState::InGame)), - ) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); - } -} diff --git a/examples/bevy_gltf_blueprints/basic/Cargo.toml b/examples/bevy_gltf_blueprints/basic/Cargo.toml deleted file mode 100644 index 24e9bf6..0000000 --- a/examples/bevy_gltf_blueprints/basic/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "bevy_gltf_blueprints_basic_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -rand = "0.8.5" diff --git a/examples/bevy_gltf_blueprints/basic/assets/assets_core.assets.ron b/examples/bevy_gltf_blueprints/basic/assets/assets_core.assets.ron deleted file mode 100644 index 8d0a099..0000000 --- a/examples/bevy_gltf_blueprints/basic/assets/assets_core.assets.ron +++ /dev/null @@ -1 +0,0 @@ -({}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic/assets/assets_game.assets.ron b/examples/bevy_gltf_blueprints/basic/assets/assets_game.assets.ron deleted file mode 100644 index 5b1e969..0000000 --- a/examples/bevy_gltf_blueprints/basic/assets/assets_game.assets.ron +++ /dev/null @@ -1,6 +0,0 @@ -({ - "world":File (path: "models/World.glb"), - "models": Folder ( - path: "models/library", - ), -}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/World.glb b/examples/bevy_gltf_blueprints/basic/assets/models/World.glb deleted file mode 100644 index 4ba597a..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/World.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb deleted file mode 100644 index 246c390..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Container.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb deleted file mode 100644 index 93831ec..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Enemy.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb deleted file mode 100644 index fc2fa99..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Finger.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb deleted file mode 100644 index 74f840f..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Hand.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb deleted file mode 100644 index 6ef1ceb..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Health_Pickup.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb deleted file mode 100644 index ebc35e6..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Humanoid_cactus.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb deleted file mode 100644 index 4058c42..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/MagicTeapot.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb deleted file mode 100644 index ca08896..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Pillar.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb deleted file mode 100644 index 1e74288..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Player.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb b/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb deleted file mode 100644 index fba53e7..0000000 Binary files a/examples/bevy_gltf_blueprints/basic/assets/models/library/Unused_in_level_test.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic/src/core/mod.rs b/examples/bevy_gltf_blueprints/basic/src/core/mod.rs deleted file mode 100644 index 6db036e..0000000 --- a/examples/bevy_gltf_blueprints/basic/src/core/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::*; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins((BlueprintsPlugin { - library_folder: "models/library".into(), - format: GltfFormat::GLB, - aabbs: true, - ..Default::default() - },)); - } -} diff --git a/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs b/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs deleted file mode 100644 index 231137b..0000000 --- a/examples/bevy_gltf_blueprints/basic/src/game/in_game.rs +++ /dev/null @@ -1,126 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; -use bevy_rapier3d::prelude::Velocity; -use rand::Rng; - -pub fn setup_game( - mut commands: Commands, - game_assets: Res, - models: Res>, - mut next_game_state: ResMut>, -) { - commands.insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 0.2, - }); - // here we actually spawn our game world/level - - commands.spawn(( - SceneBundle { - // note: because of this issue https://github.com/bevyengine/bevy/issues/10436, "world" is now a gltf file instead of a scene - scene: models - .get(game_assets.world.clone().unwrap().id()) - .expect("main level should have been loaded") - .scenes[0] - .clone(), - ..default() - }, - bevy::prelude::Name::from("world"), - GameWorldTag, - InAppRunning, - )); - - next_game_state.set(GameState::InGame) -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct UnregisteredComponent; - -pub fn spawn_test( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::KeyT) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} - -pub fn spawn_test_unregisted_components( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::KeyU) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - UnregisteredComponent, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs deleted file mode 100644 index c131150..0000000 --- a/examples/bevy_gltf_blueprints/basic/src/game/in_main_menu.rs +++ /dev/null @@ -1,121 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; - -pub fn setup_main_menu(mut commands: Commands) { - commands.spawn(( - Camera2dBundle { - camera: Camera { - order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 - ..default() - }, - ..Default::default() - }, - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "SOME GAME TITLE !!", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(100.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "New Game (press Enter to start, press T once the game is started for demo spawning)", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(200.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - /* - commands.spawn(( - TextBundle::from_section( - "Load Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(250.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - )); - - commands.spawn(( - TextBundle::from_section( - "Exit Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(300.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - ));*/ -} - -pub fn teardown_main_menu(bla: Query>, mut commands: Commands) { - for bli in bla.iter() { - commands.entity(bli).despawn_recursive(); - } -} - -pub fn main_menu( - keycode: Res>, - - mut next_app_state: ResMut>, - // mut next_game_state: ResMut>, - // mut save_requested_events: EventWriter, - // mut load_requested_events: EventWriter, -) { - if keycode.just_pressed(KeyCode::Enter) { - next_app_state.set(AppState::AppLoading); - // next_game_state.set(GameState::None); - } - - if keycode.just_pressed(KeyCode::KeyL) { - next_app_state.set(AppState::AppLoading); - // load_requested_events.send(LoadRequest { path: "toto".into() }) - } - - if keycode.just_pressed(KeyCode::KeyS) { - // save_requested_events.send(SaveRequest { path: "toto".into() }) - } -} diff --git a/examples/bevy_gltf_blueprints/basic/src/game/mod.rs b/examples/bevy_gltf_blueprints/basic/src/game/mod.rs deleted file mode 100644 index 3436f29..0000000 --- a/examples/bevy_gltf_blueprints/basic/src/game/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -pub mod in_game; -pub use in_game::*; - -pub mod in_main_menu; -pub use in_main_menu::*; - -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; - -pub struct GamePlugin; -impl Plugin for GamePlugin { - fn build(&self, app: &mut App) { - app.add_systems( - Update, - (spawn_test, spawn_test_unregisted_components).run_if(in_state(GameState::InGame)), - ) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); - } -} diff --git a/examples/bevy_gltf_blueprints/basic/src/main.rs b/examples/bevy_gltf_blueprints/basic/src/main.rs deleted file mode 100644 index 3c95987..0000000 --- a/examples/bevy_gltf_blueprints/basic/src/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; - -mod core; -use crate::core::*; - -mod game; -use game::*; - -mod test_components; -use test_components::*; - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // our custom plugins - CommonPlugin, - CorePlugin, // reusable plugins - GamePlugin, // specific to our game - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .run(); -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml b/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml deleted file mode 100644 index f1e4091..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "bevy_gltf_blueprints_basic_xpbd_physics_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common_xpbd = { path = "../../common_xpbd" } -bevy_xpbd_3d = "0.5" -rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/README.md b/examples/bevy_gltf_blueprints/basic_xpbd_physics/README.md deleted file mode 100644 index a6a1051..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/README.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Basic xpbd physics example/demo - -Same as the basic example but using [xpbd](https://github.com/Jondolf/bevy_xpbd) instead of Rapier [rapier](https://github.com/dimforge/bevy_rapier) - -## Running this example - -``` -cargo run --features bevy/dynamic_linking -``` - -### Additional notes - -* You usually define either the Components directly or use ```Proxy components``` that get replaced in Bevy systems with the actual Components that you want (usually when for some reason, ie external crates with unregistered components etc) you cannot use the components directly. -* this example contains code for future features, not finished yet ! please disregard anything related to saving & loading diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/advanced.blend b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/advanced.blend deleted file mode 100644 index 17f54bd..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/advanced.blend and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/assets_core.assets.ron b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/assets_core.assets.ron deleted file mode 100644 index 8d0a099..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/assets_core.assets.ron +++ /dev/null @@ -1 +0,0 @@ -({}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/assets_game.assets.ron b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/assets_game.assets.ron deleted file mode 100644 index 5b1e969..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/assets_game.assets.ron +++ /dev/null @@ -1,6 +0,0 @@ -({ - "world":File (path: "models/World.glb"), - "models": Folder ( - path: "models/library", - ), -}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/World.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/World.glb deleted file mode 100644 index 8ccee31..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/World.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Container.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Container.glb deleted file mode 100644 index 6d57403..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Container.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Health_Pickup.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Health_Pickup.glb deleted file mode 100644 index 4643320..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Health_Pickup.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/MagicTeapot.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/MagicTeapot.glb deleted file mode 100644 index 7a7020b..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/MagicTeapot.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Pillar.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Pillar.glb deleted file mode 100644 index 24c17ac..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Pillar.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Player.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Player.glb deleted file mode 100644 index a7ef15f..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Player.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Unused_in_level_test.glb b/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Unused_in_level_test.glb deleted file mode 100644 index b5937bb..0000000 Binary files a/examples/bevy_gltf_blueprints/basic_xpbd_physics/assets/models/library/Unused_in_level_test.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs deleted file mode 100644 index 0b481ac..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/core/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::*; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins((BlueprintsPlugin { - library_folder: "models/library".into(), - ..Default::default() - },)); - } -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs deleted file mode 100644 index 6853655..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_game.rs +++ /dev/null @@ -1,76 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common_xpbd::{assets::GameAssets, GameState, InAppRunning}; -use bevy_xpbd_3d::prelude::*; -use rand::Rng; - -pub fn setup_game( - mut commands: Commands, - game_assets: Res, - models: Res>, - mut next_game_state: ResMut>, -) { - commands.insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 0.2, - }); - // here we actually spawn our game world/level - - commands.spawn(( - SceneBundle { - // note: because of this issue https://github.com/bevyengine/bevy/issues/10436, "world" is now a gltf file instead of a scene - scene: models - .get(game_assets.world.clone().unwrap().id()) - .expect("main level should have been loaded") - .scenes[0] - .clone(), - ..default() - }, - bevy::prelude::Name::from("world"), - GameWorldTag, - InAppRunning, - )); - - next_game_state.set(GameState::InGame) -} - -pub fn spawn_test( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::KeyT) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - LinearVelocity(Vec3::new(vel_x, vel_y, vel_z)), - AngularVelocity::ZERO, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs deleted file mode 100644 index 212d1fc..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/in_main_menu.rs +++ /dev/null @@ -1,107 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_xpbd::{AppState, InMainMenu}; - -pub fn setup_main_menu(mut commands: Commands) { - commands.spawn(( - Camera2dBundle { - camera: Camera { - order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 - ..default() - }, - ..Default::default() - }, - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "SOME GAME TITLE !!", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(100.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "New Game (press Enter to start, press T once the game is started for demo spawning)", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(200.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - /* - commands.spawn(( - TextBundle::from_section( - "Load Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(250.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - )); - - commands.spawn(( - TextBundle::from_section( - "Exit Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(300.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - ));*/ -} - -pub fn teardown_main_menu(bla: Query>, mut commands: Commands) { - for bli in bla.iter() { - commands.entity(bli).despawn_recursive(); - } -} - -pub fn main_menu( - keycode: Res>, - mut next_app_state: ResMut>, -) { - if keycode.just_pressed(KeyCode::Enter) { - next_app_state.set(AppState::AppLoading); - } -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs deleted file mode 100644 index 8aff7d6..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/game/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub mod in_game; -pub use in_game::*; - -pub mod in_main_menu; -pub use in_main_menu::*; - -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_xpbd::{AppState, GameState}; - -pub struct GamePlugin; -impl Plugin for GamePlugin { - fn build(&self, app: &mut App) { - app.add_systems(Update, (spawn_test,).run_if(in_state(GameState::InGame))) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); - } -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs deleted file mode 100644 index 2de0274..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_xpbd::CommonPlugin; - -mod core; -use crate::core::*; - -mod game; -use game::*; - -mod test_components; -use test_components::*; - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // our custom plugins - CommonPlugin, - CorePlugin, // reusable plugins - GamePlugin, // specific to our game - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .run(); -} diff --git a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/test_components.rs b/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/test_components.rs deleted file mode 100644 index b5384e2..0000000 --- a/examples/bevy_gltf_blueprints/basic_xpbd_physics/src/test_components.rs +++ /dev/null @@ -1,80 +0,0 @@ -use bevy::prelude::*; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct UnitTest; - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -struct TupleTestF32(f32); - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -struct TupleTestU64(u64); - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -pub struct TupleTestStr(String); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTest2(f32, u64, String); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTestBool(bool); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec2(Vec2); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec3(Vec3); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec(Vec); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTestColor(Color); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct BasicTest { - a: f32, - b: u64, - c: String, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub enum EnumTest { - Metal, - Wood, - Rock, - Cloth, - Squishy, - #[default] - None, -} - -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { - fn build(&self, app: &mut App) { - app.register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::>(); - } -} diff --git a/examples/bevy_gltf_blueprints/materials/Cargo.toml b/examples/bevy_gltf_blueprints/materials/Cargo.toml deleted file mode 100644 index 74759ac..0000000 --- a/examples/bevy_gltf_blueprints/materials/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "bevy_gltf_blueprints_materials_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/materials/assets/assets_core.assets.ron b/examples/bevy_gltf_blueprints/materials/assets/assets_core.assets.ron deleted file mode 100644 index 8d0a099..0000000 --- a/examples/bevy_gltf_blueprints/materials/assets/assets_core.assets.ron +++ /dev/null @@ -1 +0,0 @@ -({}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/materials/assets/assets_game.assets.ron b/examples/bevy_gltf_blueprints/materials/assets/assets_game.assets.ron deleted file mode 100644 index 3da73e1..0000000 --- a/examples/bevy_gltf_blueprints/materials/assets/assets_game.assets.ron +++ /dev/null @@ -1,9 +0,0 @@ -({ - "world":File (path: "models/Level1.glb"), - "models": Folder ( - path: "models/library", - ), - "materials": Folder ( - path: "materials", - ), -}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/materials/assets/materials/materials_materials_library.glb b/examples/bevy_gltf_blueprints/materials/assets/materials/materials_materials_library.glb deleted file mode 100644 index deb7aa8..0000000 Binary files a/examples/bevy_gltf_blueprints/materials/assets/materials/materials_materials_library.glb and /dev/null differ diff --git a/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs b/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs deleted file mode 100644 index 6bdf1d9..0000000 --- a/examples/bevy_gltf_blueprints/materials/src/game/in_game.rs +++ /dev/null @@ -1,83 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; - -use bevy_rapier3d::prelude::Velocity; -use rand::Rng; - -pub fn setup_game( - mut commands: Commands, - game_assets: Res, - models: Res>, - mut next_game_state: ResMut>, -) { - commands.insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 0.2, - }); - // here we actually spawn our game world/level - - commands.spawn(( - SceneBundle { - // note: because of this issue https://github.com/bevyengine/bevy/issues/10436, "world" is now a gltf file instead of a scene - scene: models - .get(game_assets.world.clone().unwrap().id()) - .expect("main level should have been loaded") - .scenes[0] - .clone(), - ..default() - }, - bevy::prelude::Name::from("world"), - GameWorldTag, - InAppRunning, - )); - - next_game_state.set(GameState::InGame) -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct UnregisteredComponent; - -pub fn spawn_test( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::KeyT) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Watermelon2".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs deleted file mode 100644 index 2b72d42..0000000 --- a/examples/bevy_gltf_blueprints/materials/src/game/in_main_menu.rs +++ /dev/null @@ -1,107 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; - -pub fn setup_main_menu(mut commands: Commands) { - commands.spawn(( - Camera2dBundle { - camera: Camera { - order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 - ..default() - }, - ..Default::default() - }, - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "SOME GAME TITLE !!", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(100.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "New Game (press Enter to start, press T once the game is started for demo spawning)", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(200.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - /* - commands.spawn(( - TextBundle::from_section( - "Load Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(250.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - )); - - commands.spawn(( - TextBundle::from_section( - "Exit Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(300.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - ));*/ -} - -pub fn teardown_main_menu(bla: Query>, mut commands: Commands) { - for bli in bla.iter() { - commands.entity(bli).despawn_recursive(); - } -} - -pub fn main_menu( - keycode: Res>, - mut next_app_state: ResMut>, -) { - if keycode.just_pressed(KeyCode::Enter) { - next_app_state.set(AppState::AppLoading); - } -} diff --git a/examples/bevy_gltf_blueprints/materials/src/game/mod.rs b/examples/bevy_gltf_blueprints/materials/src/game/mod.rs deleted file mode 100644 index a8e8352..0000000 --- a/examples/bevy_gltf_blueprints/materials/src/game/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub mod in_game; -pub use in_game::*; - -pub mod in_main_menu; -pub use in_main_menu::*; - -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; - -pub struct GamePlugin; -impl Plugin for GamePlugin { - fn build(&self, app: &mut App) { - app.add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); - } -} diff --git a/examples/bevy_gltf_blueprints/materials/src/main.rs b/examples/bevy_gltf_blueprints/materials/src/main.rs deleted file mode 100644 index 3c95987..0000000 --- a/examples/bevy_gltf_blueprints/materials/src/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; - -mod core; -use crate::core::*; - -mod game; -use game::*; - -mod test_components; -use test_components::*; - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // our custom plugins - CommonPlugin, - CorePlugin, // reusable plugins - GamePlugin, // specific to our game - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .run(); -} diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml deleted file mode 100644 index cdfc9de..0000000 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "bevy_gltf_blueprints_multiple_levels_multiple_blendfiles" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/assets_core.assets.ron b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/assets_core.assets.ron deleted file mode 100644 index 8d0a099..0000000 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/assets_core.assets.ron +++ /dev/null @@ -1 +0,0 @@ -({}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/assets_game.assets.ron b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/assets_game.assets.ron deleted file mode 100644 index 7ca7d51..0000000 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/assets_game.assets.ron +++ /dev/null @@ -1,12 +0,0 @@ -({ - "world":File (path: "models/StartLevel.glb"), - "level1":File (path: "models/Level1.glb"), - "level2":File (path: "models/Level2.glb"), - - "models": Folder ( - path: "models/library", - ), - "materials": Folder ( - path: "materials", - ), -}) \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/core/mod.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/core/mod.rs deleted file mode 100644 index 37d9f8c..0000000 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/core/mod.rs +++ /dev/null @@ -1,13 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::*; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins((BlueprintsPlugin { - library_folder: "models/library".into(), - material_library: true, - ..Default::default() - },)); - } -} diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs deleted file mode 100644 index 2b72d42..0000000 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_main_menu.rs +++ /dev/null @@ -1,107 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; - -pub fn setup_main_menu(mut commands: Commands) { - commands.spawn(( - Camera2dBundle { - camera: Camera { - order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 - ..default() - }, - ..Default::default() - }, - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "SOME GAME TITLE !!", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(100.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "New Game (press Enter to start, press T once the game is started for demo spawning)", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(200.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - /* - commands.spawn(( - TextBundle::from_section( - "Load Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(250.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - )); - - commands.spawn(( - TextBundle::from_section( - "Exit Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(300.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - ));*/ -} - -pub fn teardown_main_menu(bla: Query>, mut commands: Commands) { - for bli in bla.iter() { - commands.entity(bli).despawn_recursive(); - } -} - -pub fn main_menu( - keycode: Res>, - mut next_app_state: ResMut>, -) { - if keycode.just_pressed(KeyCode::Enter) { - next_app_state.set(AppState::AppLoading); - } -} diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs b/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs deleted file mode 100644 index 3c95987..0000000 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; - -mod core; -use crate::core::*; - -mod game; -use game::*; - -mod test_components; -use test_components::*; - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // our custom plugins - CommonPlugin, - CorePlugin, // reusable plugins - GamePlugin, // specific to our game - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .run(); -} diff --git a/examples/bevy_gltf_components/basic/Cargo.toml b/examples/bevy_gltf_components/basic/Cargo.toml deleted file mode 100644 index 6e6cb1a..0000000 --- a/examples/bevy_gltf_components/basic/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "bevy_gltf_components_basic_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_components = { path = "../../../crates/bevy_gltf_components" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } diff --git a/examples/bevy_gltf_components/basic/README.md b/examples/bevy_gltf_components/basic/README.md deleted file mode 100644 index d12e91e..0000000 --- a/examples/bevy_gltf_components/basic/README.md +++ /dev/null @@ -1,64 +0,0 @@ - -# Basic bevy_gltf_components + wasm demo - - -## Running this example (non-wasm) - -``` -cargo run --features bevy/dynamic_linking -``` - -## Wasm - -### Setup - -as per the bevy documentation: - -```shell -rustup target add wasm32-unknown-unknown -cargo install wasm-bindgen-cli -``` - - -### Building this example - -navigate to the current folder , and then - - -```shell -cargo build --release --target wasm32-unknown-unknown --target-dir ./target -wasm-bindgen --out-name wasm_example \ - --out-dir ./target/wasm \ - --target web target/wasm32-unknown-unknown/release/bevy_gltf_components_basic_wasm_example.wasm - -``` - -### Running this example - -run a web server in the current folder, and navigate to the page, you should see the example in your browser - - -## Additional notes - -* You usually define either the Components directly or use ```Proxy components``` that get replaced in Bevy systems with the actual Components that you want (usually when for some reason, ie external crates with unregistered components etc) you cannot use the components directly. - -Included are the following modules / tools - * [```process_gltf```](./src/process_gltfs.rs) the most important module: this is the one extracting ```component``` information from the gltf files - * [```insert_dependant_component```](./src/core/relationships/relationships_insert_dependant_components.rs) a small utility to automatically inject - components that are dependant on an other component - for example an Entity with a Player component should also always have a ShouldBeWithPlayer component - you get a warning if you use this though, as I consider this to be stop-gap solution (usually you should have either a bundle, or directly define all needed components) - * [```camera```](./src/core/camera/) an example post process/replace proxies plugin, for Camera that also adds CameraTracking functions (to enable a camera to follow an object, ie the player) - * [```lighting```](./src/core/lighting/) an other example post process/replace proxies plugin for lighting, that toggles shadows, lighting config, etc so that things look closer to the original Blender data - * [```physics```](./src/core/physics/) an other example post process/replace proxies plugin for physics, that add [Rapier](https://rapier.rs/docs/user_guides/bevy_plugin/getting_started_bevy) Colliders, Rigidbodies etc . Most of these do not need proxies these days, as the most Rapier components are in the Registry & can be used directly - -Feel free to use as you want, rip it appart, use any/all parts that you need ! - -This tooling and workflow has enabled me to go from a blank Bevy + Blender setup to a working barebones level in very little time (30 minutes or so ?) ! -You can then add your own components & systems for your own gameplay very easilly - - -## Information -- the Bevy/ Rust code is [here](./src/main.rs) -- the Blender file is [here](./assets/basic.blend) -- I added [bevy_editor_pls](https://github.com/jakobhellermann/bevy_editor_pls) as a dependency for convenience so you can inspect your level/components diff --git a/examples/bevy_gltf_components/basic/assets/basic.blend b/examples/bevy_gltf_components/basic/assets/basic.blend deleted file mode 100644 index 0447205..0000000 Binary files a/examples/bevy_gltf_components/basic/assets/basic.blend and /dev/null differ diff --git a/examples/bevy_gltf_components/basic/assets/models/Level1.glb b/examples/bevy_gltf_components/basic/assets/models/Level1.glb deleted file mode 100644 index 3779945..0000000 Binary files a/examples/bevy_gltf_components/basic/assets/models/Level1.glb and /dev/null differ diff --git a/examples/bevy_gltf_components/basic/index.html b/examples/bevy_gltf_components/basic/index.html deleted file mode 100644 index 6e37b45..0000000 --- a/examples/bevy_gltf_components/basic/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - diff --git a/examples/bevy_gltf_components/basic/src/main.rs b/examples/bevy_gltf_components/basic/src/main.rs deleted file mode 100644 index 40df6cf..0000000 --- a/examples/bevy_gltf_components/basic/src/main.rs +++ /dev/null @@ -1,74 +0,0 @@ -use bevy::{gltf::Gltf, prelude::*}; -use bevy_gltf_components::ComponentsFromGltfPlugin; -use bevy_gltf_worlflow_examples_common_rapier::CorePlugin; - -mod test_components; -use test_components::*; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -/// helper marker component -pub struct LoadedMarker; - -#[derive(Debug, Clone, Copy, Default, Eq, PartialEq, Hash, States)] -enum AppState { - #[default] - Loading, - Running, -} - -#[derive(Resource)] -pub struct MyGltf(pub Handle); - -// we preload the data here, but this is for DEMO PURPOSES ONLY !! Please use https://github.com/NiklasEi/bevy_asset_loader or a similar logic to seperate loading / pre processing -// of assets from the spawning -// MyGltf is also just for the same purpose, you do not need it in a real scenario -// the states here are also for demo purposes only, -fn setup(mut commands: Commands, asset_server: Res) { - commands.insert_resource(MyGltf(asset_server.load("models/Level1.glb"))); -} - -fn spawn_level( - mut commands: Commands, - scene_markers: Query<&LoadedMarker>, - mut asset_event_reader: EventReader>, - mut next_state: ResMut>, - models: Res>, -) { - if let Some(asset_event) = asset_event_reader.read().next() { - if let AssetEvent::Added { id } = asset_event { - info!("GLTF loaded/ added {:?}", asset_event); - let my_gltf = models.get(*id).unwrap(); - if scene_markers.is_empty() { - info!("spawning scene"); - commands.spawn(( - SceneBundle { - scene: my_gltf.scenes[0].clone(), - ..default() - }, - LoadedMarker, - Name::new("Level1"), - )); - next_state.set(AppState::Running); - } - } - } -} - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // editor - // EditorPlugin::default(), - // physics - // our custom plugins - ComponentsFromGltfPlugin::default(), - CorePlugin, // reusable plugins - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .init_state::() - .add_systems(Startup, setup) - .add_systems(Update, (spawn_level.run_if(in_state(AppState::Loading)),)) - .run(); -} diff --git a/examples/bevy_gltf_save_load/basic/Cargo.toml b/examples/bevy_gltf_save_load/basic/Cargo.toml deleted file mode 100644 index ce1e6e4..0000000 --- a/examples/bevy_gltf_save_load/basic/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "bevy_gltf_save_load_basic_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_gltf_save_load = { path = "../../../crates/bevy_gltf_save_load" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } - -serde_json = "1.0.108" -serde = "1.0.193" -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_save_load/basic/assets/assets_core.assets.ron b/examples/bevy_gltf_save_load/basic/assets/assets_core.assets.ron deleted file mode 100644 index 8d0a099..0000000 --- a/examples/bevy_gltf_save_load/basic/assets/assets_core.assets.ron +++ /dev/null @@ -1 +0,0 @@ -({}) \ No newline at end of file diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Pillar.glb b/examples/bevy_gltf_save_load/basic/assets/models/library/Pillar.glb deleted file mode 100644 index 891122c..0000000 Binary files a/examples/bevy_gltf_save_load/basic/assets/models/library/Pillar.glb and /dev/null differ diff --git a/examples/bevy_gltf_save_load/basic/src/core/mod.rs b/examples/bevy_gltf_save_load/basic/src/core/mod.rs deleted file mode 100644 index c6173bb..0000000 --- a/examples/bevy_gltf_save_load/basic/src/core/mod.rs +++ /dev/null @@ -1,45 +0,0 @@ -use bevy::{ - core_pipeline::tonemapping::Tonemapping, - prelude::*, - render::{camera::CameraRenderGraph, primitives::Frustum, view::VisibleEntities}, - utils::HashSet, -}; -use bevy_gltf_blueprints::*; -use bevy_gltf_save_load::*; -use bevy_gltf_worlflow_examples_common_rapier::{CameraTrackingOffset, Pickable}; -use bevy_rapier3d::dynamics::Velocity; -use std::any::TypeId; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins(( - SaveLoadPlugin { - save_path: "scenes".into(), - component_filter: SceneFilter::Allowlist(HashSet::from([ - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - TypeId::of::(), - ])), - ..Default::default() - }, - BlueprintsPlugin { - library_folder: "models/library".into(), - format: GltfFormat::GLB, - aabbs: true, - ..Default::default() - }, - )); - } -} diff --git a/examples/bevy_gltf_save_load/basic/src/main.rs b/examples/bevy_gltf_save_load/basic/src/main.rs deleted file mode 100644 index 3c95987..0000000 --- a/examples/bevy_gltf_save_load/basic/src/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; - -mod core; -use crate::core::*; - -mod game; -use game::*; - -mod test_components; -use test_components::*; - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // our custom plugins - CommonPlugin, - CorePlugin, // reusable plugins - GamePlugin, // specific to our game - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .run(); -} diff --git a/examples/bevy_gltf_save_load/basic/src/test_components.rs b/examples/bevy_gltf_save_load/basic/src/test_components.rs deleted file mode 100644 index b5384e2..0000000 --- a/examples/bevy_gltf_save_load/basic/src/test_components.rs +++ /dev/null @@ -1,80 +0,0 @@ -use bevy::prelude::*; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct UnitTest; - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -struct TupleTestF32(f32); - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -struct TupleTestU64(u64); - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -pub struct TupleTestStr(String); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTest2(f32, u64, String); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTestBool(bool); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec2(Vec2); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec3(Vec3); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec(Vec); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTestColor(Color); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct BasicTest { - a: f32, - b: u64, - c: String, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub enum EnumTest { - Metal, - Wood, - Rock, - Cloth, - Squishy, - #[default] - None, -} - -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { - fn build(&self, app: &mut App) { - app.register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::>(); - } -} diff --git a/examples/bevy_registry_export/basic/Cargo.toml b/examples/bevy_registry_export/basic/Cargo.toml deleted file mode 100644 index 47ca4fa..0000000 --- a/examples/bevy_registry_export/basic/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "bevy_bevy_registry_export_basic_example" -version = "0.3.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../../crates/bevy_gltf_blueprints" } -bevy_registry_export = { path = "../../../crates/bevy_registry_export" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../common_rapier" } -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -rand = "0.8.5" diff --git a/examples/bevy_registry_export/basic/README.md b/examples/bevy_registry_export/basic/README.md deleted file mode 100644 index 5d2e087..0000000 --- a/examples/bevy_registry_export/basic/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Bevy registry export example/demo - -This example showcases -* the use of the bevy_registry_export crate to extract all components & types information into a json file. -* That file is then used by the [Blender addon](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/bevy_components) to create Uis for each component, -to be able to add & edit Bevy components easilly in Blender ! - - -## Running this example - -``` -cargo run --features bevy/dynamic_linking -``` - -Running the example also regenerates the registry.json file. diff --git a/examples/bevy_registry_export/basic/assets/assets_core.assets.ron b/examples/bevy_registry_export/basic/assets/assets_core.assets.ron deleted file mode 100644 index 8d0a099..0000000 --- a/examples/bevy_registry_export/basic/assets/assets_core.assets.ron +++ /dev/null @@ -1 +0,0 @@ -({}) \ No newline at end of file diff --git a/examples/bevy_registry_export/basic/assets/assets_game.assets.ron b/examples/bevy_registry_export/basic/assets/assets_game.assets.ron deleted file mode 100644 index 5b1e969..0000000 --- a/examples/bevy_registry_export/basic/assets/assets_game.assets.ron +++ /dev/null @@ -1,6 +0,0 @@ -({ - "world":File (path: "models/World.glb"), - "models": Folder ( - path: "models/library", - ), -}) \ No newline at end of file diff --git a/examples/bevy_registry_export/basic/assets/basic.blend b/examples/bevy_registry_export/basic/assets/basic.blend deleted file mode 100644 index cdb6b22..0000000 Binary files a/examples/bevy_registry_export/basic/assets/basic.blend and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/World.glb b/examples/bevy_registry_export/basic/assets/models/World.glb deleted file mode 100644 index b7bc2b5..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/World.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/library/Container.glb b/examples/bevy_registry_export/basic/assets/models/library/Container.glb deleted file mode 100644 index 21cf8ab..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/library/Container.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/library/Health_Pickup.glb b/examples/bevy_registry_export/basic/assets/models/library/Health_Pickup.glb deleted file mode 100644 index 0361392..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/library/Health_Pickup.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/library/MagicTeapot.glb b/examples/bevy_registry_export/basic/assets/models/library/MagicTeapot.glb deleted file mode 100644 index 35b4638..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/library/MagicTeapot.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/library/Pillar.glb b/examples/bevy_registry_export/basic/assets/models/library/Pillar.glb deleted file mode 100644 index ca08896..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/library/Pillar.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/library/Player.glb b/examples/bevy_registry_export/basic/assets/models/library/Player.glb deleted file mode 100644 index e91658d..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/library/Player.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/assets/models/library/Unused_in_level_test.glb b/examples/bevy_registry_export/basic/assets/models/library/Unused_in_level_test.glb deleted file mode 100644 index 18b9054..0000000 Binary files a/examples/bevy_registry_export/basic/assets/models/library/Unused_in_level_test.glb and /dev/null differ diff --git a/examples/bevy_registry_export/basic/src/core/mod.rs b/examples/bevy_registry_export/basic/src/core/mod.rs deleted file mode 100644 index 73dccf1..0000000 --- a/examples/bevy_registry_export/basic/src/core/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::*; -use bevy_registry_export::*; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins(( - ExportRegistryPlugin { - save_path: "registry.json".into(), - ..Default::default() - }, - BlueprintsPlugin { - legacy_mode: false, - library_folder: "models/library".into(), - format: GltfFormat::GLB, - aabbs: true, - ..Default::default() - }, - )); - } -} diff --git a/examples/bevy_registry_export/basic/src/game/in_game.rs b/examples/bevy_registry_export/basic/src/game/in_game.rs deleted file mode 100644 index 11ee36d..0000000 --- a/examples/bevy_registry_export/basic/src/game/in_game.rs +++ /dev/null @@ -1,83 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common_rapier::{assets::GameAssets, GameState, InAppRunning}; - -use bevy_rapier3d::prelude::Velocity; -use rand::Rng; - -pub fn setup_game( - mut commands: Commands, - game_assets: Res, - models: Res>, - mut next_game_state: ResMut>, -) { - commands.insert_resource(AmbientLight { - color: Color::WHITE, - brightness: 0.2, - }); - // here we actually spawn our game world/level - - commands.spawn(( - SceneBundle { - // note: because of this issue https://github.com/bevyengine/bevy/issues/10436, "world" is now a gltf file instead of a scene - scene: models - .get(game_assets.world.clone().unwrap().id()) - .expect("main level should have been loaded") - .scenes[0] - .clone(), - ..default() - }, - bevy::prelude::Name::from("world"), - GameWorldTag, - InAppRunning, - )); - - next_game_state.set(GameState::InGame) -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct UnregisteredComponent; - -pub fn spawn_test( - keycode: Res>, - mut commands: Commands, - - mut game_world: Query<(Entity, &Children), With>, -) { - if keycode.just_pressed(KeyCode::KeyT) { - let world = game_world.single_mut(); - let world = world.1[0]; - - let mut rng = rand::thread_rng(); - let range = 5.5; - let x: f32 = rng.gen_range(-range..range); - let y: f32 = rng.gen_range(-range..range); - - let mut rng = rand::thread_rng(); - let range = 0.8; - let vel_x: f32 = rng.gen_range(-range..range); - let vel_y: f32 = rng.gen_range(2.0..2.5); - let vel_z: f32 = rng.gen_range(-range..range); - - let name_index: u64 = rng.gen(); - - let new_entity = commands - .spawn(( - BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), - ..Default::default() - }, - bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, - TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { - linvel: Vec3::new(vel_x, vel_y, vel_z), - angvel: Vec3::new(0.0, 0.0, 0.0), - }, - )) - .id(); - commands.entity(world).add_child(new_entity); - } -} diff --git a/examples/bevy_registry_export/basic/src/game/in_main_menu.rs b/examples/bevy_registry_export/basic/src/game/in_main_menu.rs deleted file mode 100644 index 2b72d42..0000000 --- a/examples/bevy_registry_export/basic/src/game/in_main_menu.rs +++ /dev/null @@ -1,107 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, InMainMenu}; - -pub fn setup_main_menu(mut commands: Commands) { - commands.spawn(( - Camera2dBundle { - camera: Camera { - order: 102, // needed because of this: https://github.com/jakobhellermann/bevy_editor_pls/blob/crates/bevy_editor_pls_default_windows/src/cameras/mod.rs#L213C9-L213C28 - ..default() - }, - ..Default::default() - }, - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "SOME GAME TITLE !!", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(100.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - commands.spawn(( - TextBundle::from_section( - "New Game (press Enter to start, press T once the game is started for demo spawning)", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(200.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu, - )); - - /* - commands.spawn(( - TextBundle::from_section( - "Load Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(250.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - )); - - commands.spawn(( - TextBundle::from_section( - "Exit Game", - TextStyle { - //font: asset_server.load("fonts/FiraMono-Medium.ttf"), - font_size: 18.0, - color: Color::WHITE, - ..Default::default() - }, - ) - .with_style(Style { - position_type: PositionType::Absolute, - top: Val::Px(300.0), - left: Val::Px(200.0), - ..default() - }), - InMainMenu - ));*/ -} - -pub fn teardown_main_menu(bla: Query>, mut commands: Commands) { - for bli in bla.iter() { - commands.entity(bli).despawn_recursive(); - } -} - -pub fn main_menu( - keycode: Res>, - mut next_app_state: ResMut>, -) { - if keycode.just_pressed(KeyCode::Enter) { - next_app_state.set(AppState::AppLoading); - } -} diff --git a/examples/bevy_registry_export/basic/src/game/mod.rs b/examples/bevy_registry_export/basic/src/game/mod.rs deleted file mode 100644 index a8e8352..0000000 --- a/examples/bevy_registry_export/basic/src/game/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub mod in_game; -pub use in_game::*; - -pub mod in_main_menu; -pub use in_main_menu::*; - -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; - -pub struct GamePlugin; -impl Plugin for GamePlugin { - fn build(&self, app: &mut App) { - app.add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game); - } -} diff --git a/examples/bevy_registry_export/basic/src/main.rs b/examples/bevy_registry_export/basic/src/main.rs deleted file mode 100644 index 3c95987..0000000 --- a/examples/bevy_registry_export/basic/src/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; - -mod core; -use crate::core::*; - -mod game; -use game::*; - -mod test_components; -use test_components::*; - -fn main() { - App::new() - .add_plugins(( - DefaultPlugins.set(AssetPlugin::default()), - // our custom plugins - CommonPlugin, - CorePlugin, // reusable plugins - GamePlugin, // specific to our game - ComponentsTestPlugin, // Showcases different type of components /structs - )) - .run(); -} diff --git a/examples/bevy_registry_export/basic/src/test_components.rs b/examples/bevy_registry_export/basic/src/test_components.rs deleted file mode 100644 index deebb1d..0000000 --- a/examples/bevy_registry_export/basic/src/test_components.rs +++ /dev/null @@ -1,136 +0,0 @@ -use bevy::prelude::*; - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct UnitTest; - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -struct TupleTestF32(f32); - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -struct TupleTestU64(u64); - -#[derive(Component, Reflect, Default, Debug, Deref, DerefMut)] -#[reflect(Component)] -pub struct TupleTestStr(String); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTest2(f32, u64, String); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTestBool(bool); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec2(Vec2); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec3(Vec3); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVec(Vec); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleVecF32F32(Vec<(f32, f32)>); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -struct TupleTestColor(Color); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct BasicTest { - a: f32, - b: u64, - c: String, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub enum EnumTest { - Metal, - Wood, - Rock, - Cloth, - Squishy, - #[default] - None, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct NestingTestLevel2 { - text: String, - enable: bool, - enum_inner: EnumTest, - color: TupleTestColor, - toggle: TupleTestBool, - basic: BasicTest, - pub nested: NestingTestLevel3, - colors_list: VecOfColors, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct NestingTestLevel3 { - vec: TupleVec3, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct NestedTupleStuff(f32, u64, NestingTestLevel2); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub enum EnumComplex { - Float(f32), - Wood(String), - Vec(BasicTest), - SomeThing, - #[default] - None, -} - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct VecOfVec3s2(Vec); - -#[derive(Component, Reflect, Default, Debug)] -#[reflect(Component)] -pub struct VecOfColors(Vec); -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { - fn build(&self, app: &mut App) { - app.register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::>() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::() - .register_type::<(f32, f32)>() - .register_type::>() - .register_type::>() - .register_type::>() - .register_type::(); - } -} diff --git a/examples/blenvy/animation/Cargo.toml b/examples/blenvy/animation/Cargo.toml new file mode 100644 index 0000000..1ae1a91 --- /dev/null +++ b/examples/blenvy/animation/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "blenvy_animation_example" +version = "0.0.1" +edition = "2021" +license = "MIT OR Apache-2.0" + +[dependencies] +bevy = { version = "0.14", features = ["dynamic_linking"] } +blenvy = { path = "../../../crates/blenvy" } +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/animation/README.md b/examples/blenvy/animation/README.md similarity index 100% rename from examples/bevy_gltf_blueprints/animation/README.md rename to examples/blenvy/animation/README.md diff --git a/examples/bevy_gltf_blueprints/animation/assets/animation.blend b/examples/blenvy/animation/art/animation.blend similarity index 58% rename from examples/bevy_gltf_blueprints/animation/assets/animation.blend rename to examples/blenvy/animation/art/animation.blend index b142524..8635b6f 100644 Binary files a/examples/bevy_gltf_blueprints/animation/assets/animation.blend and b/examples/blenvy/animation/art/animation.blend differ diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/Fox.glb b/examples/blenvy/animation/assets/blueprints/Fox.glb similarity index 64% rename from examples/bevy_gltf_blueprints/animation/assets/models/library/Fox.glb rename to examples/blenvy/animation/assets/blueprints/Fox.glb index e30ac35..f756cce 100644 Binary files a/examples/bevy_gltf_blueprints/animation/assets/models/library/Fox.glb and b/examples/blenvy/animation/assets/blueprints/Fox.glb differ diff --git a/examples/blenvy/animation/assets/blueprints/Player.glb b/examples/blenvy/animation/assets/blueprints/Player.glb new file mode 100644 index 0000000..12ec425 Binary files /dev/null and b/examples/blenvy/animation/assets/blueprints/Player.glb differ diff --git a/examples/blenvy/animation/assets/blueprints/Wheelbot.glb b/examples/blenvy/animation/assets/blueprints/Wheelbot.glb new file mode 100644 index 0000000..9df730d Binary files /dev/null and b/examples/blenvy/animation/assets/blueprints/Wheelbot.glb differ diff --git a/examples/blenvy/animation/assets/levels/World.glb b/examples/blenvy/animation/assets/levels/World.glb new file mode 100644 index 0000000..0097662 Binary files /dev/null and b/examples/blenvy/animation/assets/levels/World.glb differ diff --git a/examples/bevy_registry_export/basic/assets/registry.json b/examples/blenvy/animation/assets/registry.json similarity index 78% rename from examples/bevy_registry_export/basic/assets/registry.json rename to examples/blenvy/animation/assets/registry.json index 95194f2..4907c53 100644 --- a/examples/bevy_registry_export/basic/assets/registry.json +++ b/examples/blenvy/animation/assets/registry.json @@ -4,30 +4,9 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "()", "prefixItems": [], "short_name": "()", - "title": "()", - "type": "array", - "typeInfo": "Tuple" - }, - "(f32, f32)": { - "isComponent": false, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - }, - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "(f32, f32)", - "title": "(f32, f32)", "type": "array", "typeInfo": "Tuple" }, @@ -35,6 +14,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "(u8, u8)", "prefixItems": [ { "type": { @@ -48,39 +28,25 @@ } ], "short_name": "(u8, u8)", - "title": "(u8, u8)", "type": "array", "typeInfo": "Tuple" }, "alloc::borrow::Cow": { "isComponent": false, "isResource": false, + "long_name": "alloc::borrow::Cow", "short_name": "Cow", - "title": "alloc::borrow::Cow", "type": "object", "typeInfo": "Value" }, "alloc::string::String": { "isComponent": false, "isResource": false, + "long_name": "alloc::string::String", "short_name": "String", - "title": "alloc::string::String", "type": "string", "typeInfo": "Value" }, - "alloc::vec::Vec<(f32, f32)>": { - "isComponent": false, - "isResource": false, - "items": { - "type": { - "$ref": "#/$defs/(f32, f32)" - } - }, - "short_name": "Vec<(f32, f32)>", - "title": "alloc::vec::Vec<(f32, f32)>", - "type": "array", - "typeInfo": "List" - }, "alloc::vec::Vec": { "isComponent": false, "isResource": false, @@ -89,8 +55,8 @@ "$ref": "#/$defs/alloc::string::String" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -102,8 +68,8 @@ "$ref": "#/$defs/bevy_animation::VariableCurve" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -115,34 +81,8 @@ "$ref": "#/$defs/bevy_animation::transition::AnimationTransition" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", - "type": "array", - "typeInfo": "List" - }, - "alloc::vec::Vec": { - "isComponent": false, - "isResource": false, - "items": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::TupleVec3" - } - }, - "short_name": "Vec", - "title": "alloc::vec::Vec", - "type": "array", - "typeInfo": "List" - }, - "alloc::vec::Vec": { - "isComponent": false, - "isResource": false, - "items": { - "type": { - "$ref": "#/$defs/bevy_color::color::Color" - } - }, - "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -154,8 +94,8 @@ "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -167,8 +107,8 @@ "$ref": "#/$defs/bevy_math::rects::urect::URect" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -180,8 +120,8 @@ "$ref": "#/$defs/bevy_pbr::light::Cascade" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -193,8 +133,8 @@ "$ref": "#/$defs/bevy_text::glyph_brush::PositionedGlyph" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -206,8 +146,8 @@ "$ref": "#/$defs/bevy_text::text::TextSection" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -219,8 +159,8 @@ "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -232,8 +172,34 @@ "$ref": "#/$defs/bevy_ui::ui_node::RepeatedGridTrack" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::animation::AnimationInfo" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::assets::BlueprintAsset" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, @@ -245,8 +211,8 @@ "$ref": "#/$defs/f32" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -258,8 +224,8 @@ "$ref": "#/$defs/glam::Quat" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -271,8 +237,8 @@ "$ref": "#/$defs/glam::Vec3" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -284,8 +250,8 @@ "$ref": "#/$defs/u16" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -297,8 +263,8 @@ "$ref": "#/$defs/u32" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -306,6 +272,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::AnimationClip", "properties": { "curves": { "type": { @@ -323,7 +290,6 @@ "duration" ], "short_name": "AnimationClip", - "title": "bevy_animation::AnimationClip", "type": "object", "typeInfo": "Struct" }, @@ -331,6 +297,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_animation::AnimationPlayer", "properties": { "active_animations": { "type": { @@ -348,7 +315,6 @@ "blend_weights" ], "short_name": "AnimationPlayer", - "title": "bevy_animation::AnimationPlayer", "type": "object", "typeInfo": "Struct" }, @@ -356,6 +322,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_animation::AnimationTarget", "properties": { "id": { "type": { @@ -373,7 +340,6 @@ "player" ], "short_name": "AnimationTarget", - "title": "bevy_animation::AnimationTarget", "type": "object", "typeInfo": "Struct" }, @@ -381,6 +347,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_animation::AnimationTargetId", "prefixItems": [ { "type": { @@ -389,29 +356,30 @@ } ], "short_name": "AnimationTargetId", - "title": "bevy_animation::AnimationTargetId", "type": "array", "typeInfo": "TupleStruct" }, "bevy_animation::Interpolation": { "isComponent": false, "isResource": false, + "long_name": "bevy_animation::Interpolation", "oneOf": [ "Linear", "Step", "CubicSpline" ], "short_name": "Interpolation", - "title": "bevy_animation::Interpolation", "type": "string", "typeInfo": "Enum" }, "bevy_animation::Keyframes": { "isComponent": false, "isResource": false, + "long_name": "bevy_animation::Keyframes", "oneOf": [ { "items": false, + "long_name": "Rotation", "prefixItems": [ { "type": { @@ -420,12 +388,12 @@ } ], "short_name": "Rotation", - "title": "Rotation", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Translation", "prefixItems": [ { "type": { @@ -434,12 +402,12 @@ } ], "short_name": "Translation", - "title": "Translation", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Scale", "prefixItems": [ { "type": { @@ -448,12 +416,12 @@ } ], "short_name": "Scale", - "title": "Scale", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weights", "prefixItems": [ { "type": { @@ -462,13 +430,11 @@ } ], "short_name": "Weights", - "title": "Weights", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Keyframes", - "title": "bevy_animation::Keyframes", "type": "object", "typeInfo": "Enum" }, @@ -476,6 +442,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::VariableCurve", "properties": { "interpolation": { "type": { @@ -499,7 +466,6 @@ "interpolation" ], "short_name": "VariableCurve", - "title": "bevy_animation::VariableCurve", "type": "object", "typeInfo": "Struct" }, @@ -507,6 +473,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::graph::AnimationGraph", "properties": { "graph": { "type": { @@ -524,7 +491,6 @@ "root" ], "short_name": "AnimationGraph", - "title": "bevy_animation::graph::AnimationGraph", "type": "object", "typeInfo": "Struct" }, @@ -532,6 +498,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransition", "properties": { "animation": { "type": { @@ -555,7 +522,6 @@ "animation" ], "short_name": "AnimationTransition", - "title": "bevy_animation::transition::AnimationTransition", "type": "object", "typeInfo": "Struct" }, @@ -563,6 +529,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransitions", "properties": { "main_animation": { "type": { @@ -579,7 +546,6 @@ "transitions" ], "short_name": "AnimationTransitions", - "title": "bevy_animation::transition::AnimationTransitions", "type": "object", "typeInfo": "Struct" }, @@ -587,6 +553,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_asset::assets::AssetIndex", "properties": { "generation": { "type": { @@ -604,16 +571,17 @@ "index" ], "short_name": "AssetIndex", - "title": "bevy_asset::assets::AssetIndex", "type": "object", "typeInfo": "Struct" }, "bevy_asset::handle::Handle<()>": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle<()>", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -622,12 +590,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -636,22 +604,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle<()>", - "title": "bevy_asset::handle::Handle<()>", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -660,12 +628,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -674,22 +642,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -698,12 +666,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -712,22 +680,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -736,12 +704,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -750,22 +718,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -774,12 +742,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -788,98 +756,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::handle::Handle": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/std::sync::Arc" - } - } - ], - "short_name": "Strong", - "title": "Strong", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" - } - } - ], - "short_name": "Weak", - "title": "Weak", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "Handle", - "title": "bevy_asset::handle::Handle", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::handle::Handle": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/std::sync::Arc" - } - } - ], - "short_name": "Strong", - "title": "Strong", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" - } - } - ], - "short_name": "Weak", - "title": "Weak", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -888,12 +780,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -902,22 +794,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -926,12 +818,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -940,22 +832,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -964,12 +856,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -978,22 +870,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1002,12 +894,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1016,22 +908,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1040,12 +932,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1054,22 +946,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1078,12 +970,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1092,22 +984,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1116,12 +1008,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1130,22 +1022,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1154,12 +1046,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1168,22 +1060,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1192,12 +1084,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1206,22 +1098,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1230,12 +1122,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1244,22 +1136,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1268,12 +1160,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1282,22 +1174,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1306,12 +1198,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1320,22 +1212,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1344,12 +1236,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1358,22 +1250,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1382,12 +1274,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1396,22 +1288,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1420,12 +1312,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1434,22 +1326,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1458,12 +1350,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1472,22 +1364,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1496,12 +1388,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1510,25 +1402,25 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId<()>": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId<()>", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1538,15 +1430,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1556,25 +1448,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId<()>", - "title": "bevy_asset::id::AssetId<()>", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1584,15 +1476,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1602,25 +1494,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1630,15 +1522,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1648,25 +1540,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1676,15 +1568,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1694,25 +1586,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1722,15 +1614,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1740,117 +1632,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::id::AssetId": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "index": { - "title": "index", - "type": { - "$ref": "#/$defs/bevy_asset::assets::AssetIndex" - } - } - }, - "required": [ - "index" - ], - "short_name": "Index", - "title": "Index", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "uuid": { - "title": "uuid", - "type": { - "$ref": "#/$defs/uuid::Uuid" - } - } - }, - "required": [ - "uuid" - ], - "short_name": "Uuid", - "title": "Uuid", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::id::AssetId": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "index": { - "title": "index", - "type": { - "$ref": "#/$defs/bevy_asset::assets::AssetIndex" - } - } - }, - "required": [ - "index" - ], - "short_name": "Index", - "title": "Index", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "uuid": { - "title": "uuid", - "type": { - "$ref": "#/$defs/uuid::Uuid" - } - } - }, - "required": [ - "uuid" - ], - "short_name": "Uuid", - "title": "Uuid", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1860,15 +1660,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1878,25 +1678,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1906,15 +1706,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1924,25 +1724,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1952,15 +1752,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -1970,25 +1770,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1998,15 +1798,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2016,25 +1816,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2044,15 +1844,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2062,25 +1862,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2090,15 +1890,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2108,25 +1908,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2136,15 +1936,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2154,25 +1954,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2182,15 +1982,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2200,25 +2000,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2228,15 +2028,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2246,25 +2046,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2274,15 +2074,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2292,25 +2092,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2320,15 +2120,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2338,25 +2138,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2366,15 +2166,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2384,25 +2184,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2412,15 +2212,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2430,25 +2230,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2458,15 +2258,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2476,25 +2276,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2504,15 +2304,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2522,25 +2322,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2550,15 +2350,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2568,25 +2368,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2596,15 +2396,15 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { "$ref": "#/$defs/uuid::Uuid" } @@ -2614,21 +2414,19 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::path::AssetPath": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::path::AssetPath", "short_name": "AssetPath", - "title": "bevy_asset::path::AssetPath", "type": "object", "typeInfo": "Value" }, @@ -2636,6 +2434,7 @@ "isComponent": false, "isResource": true, "items": false, + "long_name": "bevy_audio::audio::DefaultSpatialScale", "prefixItems": [ { "type": { @@ -2644,7 +2443,6 @@ } ], "short_name": "DefaultSpatialScale", - "title": "bevy_audio::audio::DefaultSpatialScale", "type": "array", "typeInfo": "TupleStruct" }, @@ -2652,6 +2450,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_audio::audio::GlobalVolume", "properties": { "volume": { "type": { @@ -2663,13 +2462,13 @@ "volume" ], "short_name": "GlobalVolume", - "title": "bevy_audio::audio::GlobalVolume", "type": "object", "typeInfo": "Struct" }, "bevy_audio::audio::PlaybackMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_audio::audio::PlaybackMode", "oneOf": [ "Once", "Loop", @@ -2677,7 +2476,6 @@ "Remove" ], "short_name": "PlaybackMode", - "title": "bevy_audio::audio::PlaybackMode", "type": "string", "typeInfo": "Enum" }, @@ -2685,6 +2483,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_audio::audio::PlaybackSettings", "properties": { "mode": { "type": { @@ -2725,7 +2524,6 @@ "spatial" ], "short_name": "PlaybackSettings", - "title": "bevy_audio::audio::PlaybackSettings", "type": "object", "typeInfo": "Struct" }, @@ -2733,6 +2531,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_audio::audio::SpatialListener", "properties": { "left_ear_offset": { "type": { @@ -2750,7 +2549,6 @@ "right_ear_offset" ], "short_name": "SpatialListener", - "title": "bevy_audio::audio::SpatialListener", "type": "object", "typeInfo": "Struct" }, @@ -2758,6 +2556,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_audio::audio::SpatialScale", "prefixItems": [ { "type": { @@ -2766,7 +2565,6 @@ } ], "short_name": "SpatialScale", - "title": "bevy_audio::audio::SpatialScale", "type": "array", "typeInfo": "TupleStruct" }, @@ -2774,6 +2572,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_audio::audio::Volume", "prefixItems": [ { "type": { @@ -2782,440 +2581,17 @@ } ], "short_name": "Volume", - "title": "bevy_audio::audio::Volume", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::BasicTest": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "a": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "b": { - "type": { - "$ref": "#/$defs/u64" - } - }, - "c": { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - } - }, - "required": [ - "a", - "b", - "c" - ], - "short_name": "BasicTest", - "title": "bevy_bevy_registry_export_basic_example::test_components::BasicTest", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_bevy_registry_export_basic_example::test_components::EnumComplex": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Float", - "title": "Float", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - } - ], - "short_name": "Wood", - "title": "Wood", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::BasicTest" - } - } - ], - "short_name": "Vec", - "title": "Vec", - "type": "array", - "typeInfo": "Tuple" - }, - { - "title": "SomeThing" - }, - { - "title": "None" - } - ], - "short_name": "EnumComplex", - "title": "bevy_bevy_registry_export_basic_example::test_components::EnumComplex", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_bevy_registry_export_basic_example::test_components::EnumTest": { - "isComponent": true, - "isResource": false, - "oneOf": [ - "Metal", - "Wood", - "Rock", - "Cloth", - "Squishy", - "None" - ], - "short_name": "EnumTest", - "title": "bevy_bevy_registry_export_basic_example::test_components::EnumTest", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_bevy_registry_export_basic_example::test_components::NestedTupleStuff": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - }, - { - "type": { - "$ref": "#/$defs/u64" - } - }, - { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::NestingTestLevel2" - } - } - ], - "short_name": "NestedTupleStuff", - "title": "bevy_bevy_registry_export_basic_example::test_components::NestedTupleStuff", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::NestingTestLevel2": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "basic": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::BasicTest" - } - }, - "color": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::TupleTestColor" - } - }, - "colors_list": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::VecOfColors" - } - }, - "enable": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "enum_inner": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::EnumTest" - } - }, - "nested": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::NestingTestLevel3" - } - }, - "text": { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - }, - "toggle": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::TupleTestBool" - } - } - }, - "required": [ - "text", - "enable", - "enum_inner", - "color", - "toggle", - "basic", - "nested", - "colors_list" - ], - "short_name": "NestingTestLevel2", - "title": "bevy_bevy_registry_export_basic_example::test_components::NestingTestLevel2", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_bevy_registry_export_basic_example::test_components::NestingTestLevel3": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "vec": { - "type": { - "$ref": "#/$defs/bevy_bevy_registry_export_basic_example::test_components::TupleVec3" - } - } - }, - "required": [ - "vec" - ], - "short_name": "NestingTestLevel3", - "title": "bevy_bevy_registry_export_basic_example::test_components::NestingTestLevel3", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleTest2": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - }, - { - "type": { - "$ref": "#/$defs/u64" - } - }, - { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - } - ], - "short_name": "TupleTest2", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleTest2", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleTestBool": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bool" - } - } - ], - "short_name": "TupleTestBool", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleTestBool", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleTestColor": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_color::color::Color" - } - } - ], - "short_name": "TupleTestColor", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleTestColor", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleTestF32": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "TupleTestF32", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleTestF32", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleTestStr": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - } - ], - "short_name": "TupleTestStr", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleTestStr", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleTestU64": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u64" - } - } - ], - "short_name": "TupleTestU64", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleTestU64", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleVec": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::vec::Vec" - } - } - ], - "short_name": "TupleVec", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleVec", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleVec2": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec2" - } - } - ], - "short_name": "TupleVec2", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleVec2", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleVec3": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "TupleVec3", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleVec3", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::TupleVecF32F32": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::vec::Vec<(f32, f32)>" - } - } - ], - "short_name": "TupleVecF32F32", - "title": "bevy_bevy_registry_export_basic_example::test_components::TupleVecF32F32", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::UnitTest": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "UnitTest", - "title": "bevy_bevy_registry_export_basic_example::test_components::UnitTest", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_bevy_registry_export_basic_example::test_components::VecOfColors": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::vec::Vec" - } - } - ], - "short_name": "VecOfColors", - "title": "bevy_bevy_registry_export_basic_example::test_components::VecOfColors", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_bevy_registry_export_basic_example::test_components::VecOfVec3s2": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::vec::Vec" - } - } - ], - "short_name": "VecOfVec3s2", - "title": "bevy_bevy_registry_export_basic_example::test_components::VecOfVec3s2", "type": "array", "typeInfo": "TupleStruct" }, "bevy_color::color::Color": { "isComponent": false, "isResource": false, + "long_name": "bevy_color::color::Color", "oneOf": [ { "items": false, + "long_name": "Srgba", "prefixItems": [ { "type": { @@ -3224,12 +2600,12 @@ } ], "short_name": "Srgba", - "title": "Srgba", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "LinearRgba", "prefixItems": [ { "type": { @@ -3238,12 +2614,12 @@ } ], "short_name": "LinearRgba", - "title": "LinearRgba", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Hsla", "prefixItems": [ { "type": { @@ -3252,12 +2628,12 @@ } ], "short_name": "Hsla", - "title": "Hsla", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Hsva", "prefixItems": [ { "type": { @@ -3266,12 +2642,12 @@ } ], "short_name": "Hsva", - "title": "Hsva", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Hwba", "prefixItems": [ { "type": { @@ -3280,12 +2656,12 @@ } ], "short_name": "Hwba", - "title": "Hwba", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Laba", "prefixItems": [ { "type": { @@ -3294,12 +2670,12 @@ } ], "short_name": "Laba", - "title": "Laba", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Lcha", "prefixItems": [ { "type": { @@ -3308,12 +2684,12 @@ } ], "short_name": "Lcha", - "title": "Lcha", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Oklaba", "prefixItems": [ { "type": { @@ -3322,12 +2698,12 @@ } ], "short_name": "Oklaba", - "title": "Oklaba", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Oklcha", "prefixItems": [ { "type": { @@ -3336,12 +2712,12 @@ } ], "short_name": "Oklcha", - "title": "Oklcha", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Xyza", "prefixItems": [ { "type": { @@ -3350,13 +2726,11 @@ } ], "short_name": "Xyza", - "title": "Xyza", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Color", - "title": "bevy_color::color::Color", "type": "object", "typeInfo": "Enum" }, @@ -3364,6 +2738,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::hsla::Hsla", "properties": { "alpha": { "type": { @@ -3393,7 +2768,6 @@ "alpha" ], "short_name": "Hsla", - "title": "bevy_color::hsla::Hsla", "type": "object", "typeInfo": "Struct" }, @@ -3401,6 +2775,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::hsva::Hsva", "properties": { "alpha": { "type": { @@ -3430,7 +2805,6 @@ "alpha" ], "short_name": "Hsva", - "title": "bevy_color::hsva::Hsva", "type": "object", "typeInfo": "Struct" }, @@ -3438,6 +2812,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::hwba::Hwba", "properties": { "alpha": { "type": { @@ -3467,7 +2842,6 @@ "alpha" ], "short_name": "Hwba", - "title": "bevy_color::hwba::Hwba", "type": "object", "typeInfo": "Struct" }, @@ -3475,6 +2849,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::laba::Laba", "properties": { "a": { "type": { @@ -3504,7 +2879,6 @@ "alpha" ], "short_name": "Laba", - "title": "bevy_color::laba::Laba", "type": "object", "typeInfo": "Struct" }, @@ -3512,6 +2886,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::lcha::Lcha", "properties": { "alpha": { "type": { @@ -3541,7 +2916,6 @@ "alpha" ], "short_name": "Lcha", - "title": "bevy_color::lcha::Lcha", "type": "object", "typeInfo": "Struct" }, @@ -3549,6 +2923,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::linear_rgba::LinearRgba", "properties": { "alpha": { "type": { @@ -3578,7 +2953,6 @@ "alpha" ], "short_name": "LinearRgba", - "title": "bevy_color::linear_rgba::LinearRgba", "type": "object", "typeInfo": "Struct" }, @@ -3586,6 +2960,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::oklaba::Oklaba", "properties": { "a": { "type": { @@ -3615,7 +2990,6 @@ "alpha" ], "short_name": "Oklaba", - "title": "bevy_color::oklaba::Oklaba", "type": "object", "typeInfo": "Struct" }, @@ -3623,6 +2997,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::oklcha::Oklcha", "properties": { "alpha": { "type": { @@ -3652,7 +3027,6 @@ "alpha" ], "short_name": "Oklcha", - "title": "bevy_color::oklcha::Oklcha", "type": "object", "typeInfo": "Struct" }, @@ -3660,6 +3034,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::srgba::Srgba", "properties": { "alpha": { "type": { @@ -3689,7 +3064,6 @@ "alpha" ], "short_name": "Srgba", - "title": "bevy_color::srgba::Srgba", "type": "object", "typeInfo": "Struct" }, @@ -3697,6 +3071,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_color::xyza::Xyza", "properties": { "alpha": { "type": { @@ -3726,7 +3101,6 @@ "alpha" ], "short_name": "Xyza", - "title": "bevy_color::xyza::Xyza", "type": "object", "typeInfo": "Struct" }, @@ -3734,6 +3108,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core::name::Name", "properties": { "hash": { "type": { @@ -3751,19 +3126,18 @@ "name" ], "short_name": "Name", - "title": "bevy_core::name::Name", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::bloom::settings::BloomCompositeMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomCompositeMode", "oneOf": [ "EnergyConserving", "Additive" ], "short_name": "BloomCompositeMode", - "title": "bevy_core_pipeline::bloom::settings::BloomCompositeMode", "type": "string", "typeInfo": "Enum" }, @@ -3771,6 +3145,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomPrefilterSettings", "properties": { "threshold": { "type": { @@ -3788,7 +3163,6 @@ "threshold_softness" ], "short_name": "BloomPrefilterSettings", - "title": "bevy_core_pipeline::bloom::settings::BloomPrefilterSettings", "type": "object", "typeInfo": "Struct" }, @@ -3796,6 +3170,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomSettings", "properties": { "composite_mode": { "type": { @@ -3837,7 +3212,6 @@ "composite_mode" ], "short_name": "BloomSettings", - "title": "bevy_core_pipeline::bloom::settings::BloomSettings", "type": "object", "typeInfo": "Struct" }, @@ -3845,6 +3219,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings", "properties": { "denoise": { "type": { @@ -3868,7 +3243,6 @@ "denoise" ], "short_name": "ContrastAdaptiveSharpeningSettings", - "title": "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings", "type": "object", "typeInfo": "Struct" }, @@ -3876,10 +3250,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", "properties": {}, "required": [], "short_name": "Camera2d", - "title": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", "type": "object", "typeInfo": "Struct" }, @@ -3887,6 +3261,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3d", "properties": { "depth_load_op": { "type": { @@ -3916,16 +3291,17 @@ "screen_space_specular_transmission_quality" ], "short_name": "Camera3d", - "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3d", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp": { "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp", "oneOf": [ { "items": false, + "long_name": "Clear", "prefixItems": [ { "type": { @@ -3934,16 +3310,14 @@ } ], "short_name": "Clear", - "title": "Clear", "type": "array", "typeInfo": "Tuple" }, { - "title": "Load" + "long_name": "Load" } ], "short_name": "Camera3dDepthLoadOp", - "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp", "type": "object", "typeInfo": "Enum" }, @@ -3951,6 +3325,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", "prefixItems": [ { "type": { @@ -3959,13 +3334,13 @@ } ], "short_name": "Camera3dDepthTextureUsage", - "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", "type": "array", "typeInfo": "TupleStruct" }, "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality": { "isComponent": false, "isResource": true, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", "oneOf": [ "Low", "Medium", @@ -3973,7 +3348,6 @@ "Ultra" ], "short_name": "ScreenSpaceTransmissionQuality", - "title": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", "type": "string", "typeInfo": "Enum" }, @@ -3981,6 +3355,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Fxaa", "properties": { "edge_threshold": { "type": { @@ -4004,13 +3379,13 @@ "edge_threshold_min" ], "short_name": "Fxaa", - "title": "bevy_core_pipeline::fxaa::Fxaa", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::fxaa::Sensitivity": { "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Sensitivity", "oneOf": [ "Low", "Medium", @@ -4019,7 +3394,6 @@ "Extreme" ], "short_name": "Sensitivity", - "title": "bevy_core_pipeline::fxaa::Sensitivity", "type": "string", "typeInfo": "Enum" }, @@ -4027,10 +3401,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::DeferredPrepass", "properties": {}, "required": [], "short_name": "DeferredPrepass", - "title": "bevy_core_pipeline::prepass::DeferredPrepass", "type": "object", "typeInfo": "Struct" }, @@ -4038,10 +3412,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::DepthPrepass", "properties": {}, "required": [], "short_name": "DepthPrepass", - "title": "bevy_core_pipeline::prepass::DepthPrepass", "type": "object", "typeInfo": "Struct" }, @@ -4049,10 +3423,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::MotionVectorPrepass", "properties": {}, "required": [], "short_name": "MotionVectorPrepass", - "title": "bevy_core_pipeline::prepass::MotionVectorPrepass", "type": "object", "typeInfo": "Struct" }, @@ -4060,16 +3434,17 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::NormalPrepass", "properties": {}, "required": [], "short_name": "NormalPrepass", - "title": "bevy_core_pipeline::prepass::NormalPrepass", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::smaa::SmaaPreset": { "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaPreset", "oneOf": [ "Low", "Medium", @@ -4077,7 +3452,6 @@ "Ultra" ], "short_name": "SmaaPreset", - "title": "bevy_core_pipeline::smaa::SmaaPreset", "type": "string", "typeInfo": "Enum" }, @@ -4085,6 +3459,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaSettings", "properties": { "preset": { "type": { @@ -4096,25 +3471,25 @@ "preset" ], "short_name": "SmaaSettings", - "title": "bevy_core_pipeline::smaa::SmaaSettings", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::tonemapping::DebandDither": { "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::tonemapping::DebandDither", "oneOf": [ "Disabled", "Enabled" ], "short_name": "DebandDither", - "title": "bevy_core_pipeline::tonemapping::DebandDither", "type": "string", "typeInfo": "Enum" }, "bevy_core_pipeline::tonemapping::Tonemapping": { "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::tonemapping::Tonemapping", "oneOf": [ "None", "Reinhard", @@ -4126,15 +3501,14 @@ "BlenderFilmic" ], "short_name": "Tonemapping", - "title": "bevy_core_pipeline::tonemapping::Tonemapping", "type": "string", "typeInfo": "Enum" }, "bevy_ecs::entity::Entity": { "isComponent": false, "isResource": false, + "long_name": "bevy_ecs::entity::Entity", "short_name": "Entity", - "title": "bevy_ecs::entity::Entity", "type": "object", "typeInfo": "Value" }, @@ -4142,6 +3516,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::aabb::AabbGizmoConfigGroup", "properties": { "default_color": { "type": { @@ -4158,7 +3533,6 @@ "draw_all" ], "short_name": "AabbGizmoConfigGroup", - "title": "bevy_gizmos::aabb::AabbGizmoConfigGroup", "type": "object", "typeInfo": "Struct" }, @@ -4166,6 +3540,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::config::GizmoConfig", "properties": { "depth_bias": { "type": { @@ -4213,7 +3588,6 @@ "line_joints" ], "short_name": "GizmoConfig", - "title": "bevy_gizmos::config::GizmoConfig", "type": "object", "typeInfo": "Struct" }, @@ -4221,25 +3595,27 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_gizmos::config::GizmoConfigStore", "properties": {}, "required": [], "short_name": "GizmoConfigStore", - "title": "bevy_gizmos::config::GizmoConfigStore", "type": "object", "typeInfo": "Struct" }, "bevy_gizmos::config::GizmoLineJoint": { "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineJoint", "oneOf": [ { - "title": "None" + "long_name": "None" }, { - "title": "Miter" + "long_name": "Miter" }, { "items": false, + "long_name": "Round", "prefixItems": [ { "type": { @@ -4248,37 +3624,37 @@ } ], "short_name": "Round", - "title": "Round", "type": "array", "typeInfo": "Tuple" }, { - "title": "Bevel" + "long_name": "Bevel" } ], "short_name": "GizmoLineJoint", - "title": "bevy_gizmos::config::GizmoLineJoint", "type": "object", "typeInfo": "Enum" }, "bevy_gizmos::config::GizmoLineStyle": { "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineStyle", "oneOf": [ "Solid", "Dotted" ], "short_name": "GizmoLineStyle", - "title": "bevy_gizmos::config::GizmoLineStyle", "type": "string", "typeInfo": "Enum" }, "bevy_gizmos::light::LightGizmoColor": { "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoColor", "oneOf": [ { "items": false, + "long_name": "Manual", "prefixItems": [ { "type": { @@ -4287,22 +3663,20 @@ } ], "short_name": "Manual", - "title": "Manual", "type": "array", "typeInfo": "Tuple" }, { - "title": "Varied" + "long_name": "Varied" }, { - "title": "MatchLightColor" + "long_name": "MatchLightColor" }, { - "title": "ByLightType" + "long_name": "ByLightType" } ], "short_name": "LightGizmoColor", - "title": "bevy_gizmos::light::LightGizmoColor", "type": "object", "typeInfo": "Enum" }, @@ -4310,6 +3684,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoConfigGroup", "properties": { "color": { "type": { @@ -4345,7 +3720,6 @@ "directional_light_color" ], "short_name": "LightGizmoConfigGroup", - "title": "bevy_gizmos::light::LightGizmoConfigGroup", "type": "object", "typeInfo": "Struct" }, @@ -4353,6 +3727,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfExtras", "properties": { "value": { "type": { @@ -4364,7 +3739,6 @@ "value" ], "short_name": "GltfExtras", - "title": "bevy_gltf::GltfExtras", "type": "object", "typeInfo": "Struct" }, @@ -4372,6 +3746,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfMaterialExtras", "properties": { "value": { "type": { @@ -4383,7 +3758,6 @@ "value" ], "short_name": "GltfMaterialExtras", - "title": "bevy_gltf::GltfMaterialExtras", "type": "object", "typeInfo": "Struct" }, @@ -4391,6 +3765,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfMeshExtras", "properties": { "value": { "type": { @@ -4402,7 +3777,6 @@ "value" ], "short_name": "GltfMeshExtras", - "title": "bevy_gltf::GltfMeshExtras", "type": "object", "typeInfo": "Struct" }, @@ -4410,6 +3784,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfSceneExtras", "properties": { "value": { "type": { @@ -4421,350 +3796,14 @@ "value" ], "short_name": "GltfSceneExtras", - "title": "bevy_gltf::GltfSceneExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_blueprints::animation::Animations": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "graph": { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } - }, - "named_animations": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - }, - "named_indices": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" - } - } - }, - "required": [ - "named_animations", - "named_indices", - "graph" - ], - "short_name": "Animations", - "title": "bevy_gltf_blueprints::animation::Animations", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_blueprints::materials::MaterialInfo": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "name": { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - }, - "source": { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - } - }, - "required": [ - "name", - "source" - ], - "short_name": "MaterialInfo", - "title": "bevy_gltf_blueprints::materials::MaterialInfo", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - } - ], - "short_name": "BlueprintName", - "title": "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - ], - "short_name": "BlueprintsList", - "title": "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "SpawnHere", - "title": "bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::GltfProcessed": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "GltfProcessed", - "title": "bevy_gltf_components::GltfProcessed", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "color": { - "type": { - "$ref": "#/$defs/bevy_color::color::Color" - } - }, - "strength": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "color", - "strength" - ], - "short_name": "BlenderBackgroundShader", - "title": "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "buffer_bias": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled", - "buffer_bias" - ], - "short_name": "BlenderLightShadows", - "title": "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "cascade_size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "cascade_size" - ], - "short_name": "BlenderShadowSettings", - "title": "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "SSAOSettings", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "CameraTrackable", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "offset": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "offset" - ], - "short_name": "CameraTracking", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "CameraTrackingOffset", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Pickable", - "title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::game::player::Player": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Player", - "title": "bevy_gltf_worlflow_examples_common::game::player::Player", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": { - "isComponent": true, - "isResource": false, - "oneOf": [ - "Cuboid", - "Ball", - "Capsule" - ], - "short_name": "AutoAABBCollider", - "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Ball", - "title": "Ball", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "Cuboid", - "title": "Cuboid", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Capsule", - "title": "Capsule", - "type": "array", - "typeInfo": "Tuple" - }, - { - "title": "Mesh" - } - ], - "short_name": "Collider", - "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider", - "type": "object", - "typeInfo": "Enum" - }, "bevy_hierarchy::components::children::Children": { "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_hierarchy::components::children::Children", "prefixItems": [ { "type": { @@ -4773,7 +3812,6 @@ } ], "short_name": "Children", - "title": "bevy_hierarchy::components::children::Children", "type": "array", "typeInfo": "TupleStruct" }, @@ -4781,6 +3819,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_hierarchy::components::parent::Parent", "prefixItems": [ { "type": { @@ -4789,19 +3828,18 @@ } ], "short_name": "Parent", - "title": "bevy_hierarchy::components::parent::Parent", "type": "array", "typeInfo": "TupleStruct" }, "bevy_input::ButtonState": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::ButtonState", "oneOf": [ "Pressed", "Released" ], "short_name": "ButtonState", - "title": "bevy_input::ButtonState", "type": "string", "typeInfo": "Enum" }, @@ -4809,6 +3847,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::AxisSettings", "properties": { "deadzone_lowerbound": { "type": { @@ -4844,7 +3883,6 @@ "threshold" ], "short_name": "AxisSettings", - "title": "bevy_input::gamepad::AxisSettings", "type": "object", "typeInfo": "Struct" }, @@ -4852,6 +3890,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::ButtonAxisSettings", "properties": { "high": { "type": { @@ -4875,7 +3914,6 @@ "threshold" ], "short_name": "ButtonAxisSettings", - "title": "bevy_input::gamepad::ButtonAxisSettings", "type": "object", "typeInfo": "Struct" }, @@ -4883,6 +3921,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::ButtonSettings", "properties": { "press_threshold": { "type": { @@ -4900,7 +3939,6 @@ "release_threshold" ], "short_name": "ButtonSettings", - "title": "bevy_input::gamepad::ButtonSettings", "type": "object", "typeInfo": "Struct" }, @@ -4908,6 +3946,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::Gamepad", "properties": { "id": { "type": { @@ -4919,7 +3958,6 @@ "id" ], "short_name": "Gamepad", - "title": "bevy_input::gamepad::Gamepad", "type": "object", "typeInfo": "Struct" }, @@ -4927,6 +3965,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxis", "properties": { "axis_type": { "type": { @@ -4944,7 +3983,6 @@ "axis_type" ], "short_name": "GamepadAxis", - "title": "bevy_input::gamepad::GamepadAxis", "type": "object", "typeInfo": "Struct" }, @@ -4952,6 +3990,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisChangedEvent", "properties": { "axis_type": { "type": { @@ -4975,34 +4014,35 @@ "value" ], "short_name": "GamepadAxisChangedEvent", - "title": "bevy_input::gamepad::GamepadAxisChangedEvent", "type": "object", "typeInfo": "Struct" }, "bevy_input::gamepad::GamepadAxisType": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisType", "oneOf": [ { - "title": "LeftStickX" + "long_name": "LeftStickX" }, { - "title": "LeftStickY" + "long_name": "LeftStickY" }, { - "title": "LeftZ" + "long_name": "LeftZ" }, { - "title": "RightStickX" + "long_name": "RightStickX" }, { - "title": "RightStickY" + "long_name": "RightStickY" }, { - "title": "RightZ" + "long_name": "RightZ" }, { "items": false, + "long_name": "Other", "prefixItems": [ { "type": { @@ -5011,13 +4051,11 @@ } ], "short_name": "Other", - "title": "Other", "type": "array", "typeInfo": "Tuple" } ], "short_name": "GamepadAxisType", - "title": "bevy_input::gamepad::GamepadAxisType", "type": "object", "typeInfo": "Enum" }, @@ -5025,6 +4063,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButton", "properties": { "button_type": { "type": { @@ -5042,7 +4081,6 @@ "button_type" ], "short_name": "GamepadButton", - "title": "bevy_input::gamepad::GamepadButton", "type": "object", "typeInfo": "Struct" }, @@ -5050,6 +4088,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonChangedEvent", "properties": { "button_type": { "type": { @@ -5073,7 +4112,6 @@ "value" ], "short_name": "GamepadButtonChangedEvent", - "title": "bevy_input::gamepad::GamepadButtonChangedEvent", "type": "object", "typeInfo": "Struct" }, @@ -5081,6 +4119,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonInput", "properties": { "button": { "type": { @@ -5098,73 +4137,74 @@ "state" ], "short_name": "GamepadButtonInput", - "title": "bevy_input::gamepad::GamepadButtonInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::gamepad::GamepadButtonType": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonType", "oneOf": [ { - "title": "South" + "long_name": "South" }, { - "title": "East" + "long_name": "East" }, { - "title": "North" + "long_name": "North" }, { - "title": "West" + "long_name": "West" }, { - "title": "C" + "long_name": "C" }, { - "title": "Z" + "long_name": "Z" }, { - "title": "LeftTrigger" + "long_name": "LeftTrigger" }, { - "title": "LeftTrigger2" + "long_name": "LeftTrigger2" }, { - "title": "RightTrigger" + "long_name": "RightTrigger" }, { - "title": "RightTrigger2" + "long_name": "RightTrigger2" }, { - "title": "Select" + "long_name": "Select" }, { - "title": "Start" + "long_name": "Start" }, { - "title": "Mode" + "long_name": "Mode" }, { - "title": "LeftThumb" + "long_name": "LeftThumb" }, { - "title": "RightThumb" + "long_name": "RightThumb" }, { - "title": "DPadUp" + "long_name": "DPadUp" }, { - "title": "DPadDown" + "long_name": "DPadDown" }, { - "title": "DPadLeft" + "long_name": "DPadLeft" }, { - "title": "DPadRight" + "long_name": "DPadRight" }, { "items": false, + "long_name": "Other", "prefixItems": [ { "type": { @@ -5173,22 +4213,22 @@ } ], "short_name": "Other", - "title": "Other", "type": "array", "typeInfo": "Tuple" } ], "short_name": "GamepadButtonType", - "title": "bevy_input::gamepad::GamepadButtonType", "type": "object", "typeInfo": "Enum" }, "bevy_input::gamepad::GamepadConnection": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnection", "oneOf": [ { "items": false, + "long_name": "Connected", "prefixItems": [ { "type": { @@ -5197,16 +4237,14 @@ } ], "short_name": "Connected", - "title": "Connected", "type": "array", "typeInfo": "Tuple" }, { - "title": "Disconnected" + "long_name": "Disconnected" } ], "short_name": "GamepadConnection", - "title": "bevy_input::gamepad::GamepadConnection", "type": "object", "typeInfo": "Enum" }, @@ -5214,6 +4252,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnectionEvent", "properties": { "connection": { "type": { @@ -5231,16 +4270,17 @@ "connection" ], "short_name": "GamepadConnectionEvent", - "title": "bevy_input::gamepad::GamepadConnectionEvent", "type": "object", "typeInfo": "Struct" }, "bevy_input::gamepad::GamepadEvent": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadEvent", "oneOf": [ { "items": false, + "long_name": "Connection", "prefixItems": [ { "type": { @@ -5249,12 +4289,12 @@ } ], "short_name": "Connection", - "title": "Connection", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Button", "prefixItems": [ { "type": { @@ -5263,12 +4303,12 @@ } ], "short_name": "Button", - "title": "Button", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Axis", "prefixItems": [ { "type": { @@ -5277,13 +4317,11 @@ } ], "short_name": "Axis", - "title": "Axis", "type": "array", "typeInfo": "Tuple" } ], "short_name": "GamepadEvent", - "title": "bevy_input::gamepad::GamepadEvent", "type": "object", "typeInfo": "Enum" }, @@ -5291,6 +4329,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadInfo", "properties": { "name": { "type": { @@ -5302,7 +4341,6 @@ "name" ], "short_name": "GamepadInfo", - "title": "bevy_input::gamepad::GamepadInfo", "type": "object", "typeInfo": "Struct" }, @@ -5310,6 +4348,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadSettings", "properties": { "axis_settings": { "type": { @@ -5351,7 +4390,6 @@ "button_axis_settings" ], "short_name": "GamepadSettings", - "title": "bevy_input::gamepad::GamepadSettings", "type": "object", "typeInfo": "Struct" }, @@ -5359,10 +4397,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gestures::DoubleTapGesture", "properties": {}, "required": [], "short_name": "DoubleTapGesture", - "title": "bevy_input::gestures::DoubleTapGesture", "type": "object", "typeInfo": "Struct" }, @@ -5370,6 +4408,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_input::gestures::PanGesture", "prefixItems": [ { "type": { @@ -5378,7 +4417,6 @@ } ], "short_name": "PanGesture", - "title": "bevy_input::gestures::PanGesture", "type": "array", "typeInfo": "TupleStruct" }, @@ -5386,6 +4424,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_input::gestures::PinchGesture", "prefixItems": [ { "type": { @@ -5394,7 +4433,6 @@ } ], "short_name": "PinchGesture", - "title": "bevy_input::gestures::PinchGesture", "type": "array", "typeInfo": "TupleStruct" }, @@ -5402,6 +4440,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_input::gestures::RotationGesture", "prefixItems": [ { "type": { @@ -5410,16 +4449,17 @@ } ], "short_name": "RotationGesture", - "title": "bevy_input::gestures::RotationGesture", "type": "array", "typeInfo": "TupleStruct" }, "bevy_input::keyboard::Key": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::Key", "oneOf": [ { "items": false, + "long_name": "Character", "prefixItems": [ { "type": { @@ -5428,12 +4468,12 @@ } ], "short_name": "Character", - "title": "Character", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Unidentified", "prefixItems": [ { "type": { @@ -5442,12 +4482,12 @@ } ], "short_name": "Unidentified", - "title": "Unidentified", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Dead", "prefixItems": [ { "type": { @@ -5456,940 +4496,940 @@ } ], "short_name": "Dead", - "title": "Dead", "type": "array", "typeInfo": "Tuple" }, { - "title": "Alt" + "long_name": "Alt" }, { - "title": "AltGraph" + "long_name": "AltGraph" }, { - "title": "CapsLock" + "long_name": "CapsLock" }, { - "title": "Control" + "long_name": "Control" }, { - "title": "Fn" + "long_name": "Fn" }, { - "title": "FnLock" + "long_name": "FnLock" }, { - "title": "NumLock" + "long_name": "NumLock" }, { - "title": "ScrollLock" + "long_name": "ScrollLock" }, { - "title": "Shift" + "long_name": "Shift" }, { - "title": "Symbol" + "long_name": "Symbol" }, { - "title": "SymbolLock" + "long_name": "SymbolLock" }, { - "title": "Meta" + "long_name": "Meta" }, { - "title": "Hyper" + "long_name": "Hyper" }, { - "title": "Super" + "long_name": "Super" }, { - "title": "Enter" + "long_name": "Enter" }, { - "title": "Tab" + "long_name": "Tab" }, { - "title": "Space" + "long_name": "Space" }, { - "title": "ArrowDown" + "long_name": "ArrowDown" }, { - "title": "ArrowLeft" + "long_name": "ArrowLeft" }, { - "title": "ArrowRight" + "long_name": "ArrowRight" }, { - "title": "ArrowUp" + "long_name": "ArrowUp" }, { - "title": "End" + "long_name": "End" }, { - "title": "Home" + "long_name": "Home" }, { - "title": "PageDown" + "long_name": "PageDown" }, { - "title": "PageUp" + "long_name": "PageUp" }, { - "title": "Backspace" + "long_name": "Backspace" }, { - "title": "Clear" + "long_name": "Clear" }, { - "title": "Copy" + "long_name": "Copy" }, { - "title": "CrSel" + "long_name": "CrSel" }, { - "title": "Cut" + "long_name": "Cut" }, { - "title": "Delete" + "long_name": "Delete" }, { - "title": "EraseEof" + "long_name": "EraseEof" }, { - "title": "ExSel" + "long_name": "ExSel" }, { - "title": "Insert" + "long_name": "Insert" }, { - "title": "Paste" + "long_name": "Paste" }, { - "title": "Redo" + "long_name": "Redo" }, { - "title": "Undo" + "long_name": "Undo" }, { - "title": "Accept" + "long_name": "Accept" }, { - "title": "Again" + "long_name": "Again" }, { - "title": "Attn" + "long_name": "Attn" }, { - "title": "Cancel" + "long_name": "Cancel" }, { - "title": "ContextMenu" + "long_name": "ContextMenu" }, { - "title": "Escape" + "long_name": "Escape" }, { - "title": "Execute" + "long_name": "Execute" }, { - "title": "Find" + "long_name": "Find" }, { - "title": "Help" + "long_name": "Help" }, { - "title": "Pause" + "long_name": "Pause" }, { - "title": "Play" + "long_name": "Play" }, { - "title": "Props" + "long_name": "Props" }, { - "title": "Select" + "long_name": "Select" }, { - "title": "ZoomIn" + "long_name": "ZoomIn" }, { - "title": "ZoomOut" + "long_name": "ZoomOut" }, { - "title": "BrightnessDown" + "long_name": "BrightnessDown" }, { - "title": "BrightnessUp" + "long_name": "BrightnessUp" }, { - "title": "Eject" + "long_name": "Eject" }, { - "title": "LogOff" + "long_name": "LogOff" }, { - "title": "Power" + "long_name": "Power" }, { - "title": "PowerOff" + "long_name": "PowerOff" }, { - "title": "PrintScreen" + "long_name": "PrintScreen" }, { - "title": "Hibernate" + "long_name": "Hibernate" }, { - "title": "Standby" + "long_name": "Standby" }, { - "title": "WakeUp" + "long_name": "WakeUp" }, { - "title": "AllCandidates" + "long_name": "AllCandidates" }, { - "title": "Alphanumeric" + "long_name": "Alphanumeric" }, { - "title": "CodeInput" + "long_name": "CodeInput" }, { - "title": "Compose" + "long_name": "Compose" }, { - "title": "Convert" + "long_name": "Convert" }, { - "title": "FinalMode" + "long_name": "FinalMode" }, { - "title": "GroupFirst" + "long_name": "GroupFirst" }, { - "title": "GroupLast" + "long_name": "GroupLast" }, { - "title": "GroupNext" + "long_name": "GroupNext" }, { - "title": "GroupPrevious" + "long_name": "GroupPrevious" }, { - "title": "ModeChange" + "long_name": "ModeChange" }, { - "title": "NextCandidate" + "long_name": "NextCandidate" }, { - "title": "NonConvert" + "long_name": "NonConvert" }, { - "title": "PreviousCandidate" + "long_name": "PreviousCandidate" }, { - "title": "Process" + "long_name": "Process" }, { - "title": "SingleCandidate" + "long_name": "SingleCandidate" }, { - "title": "HangulMode" + "long_name": "HangulMode" }, { - "title": "HanjaMode" + "long_name": "HanjaMode" }, { - "title": "JunjaMode" + "long_name": "JunjaMode" }, { - "title": "Eisu" + "long_name": "Eisu" }, { - "title": "Hankaku" + "long_name": "Hankaku" }, { - "title": "Hiragana" + "long_name": "Hiragana" }, { - "title": "HiraganaKatakana" + "long_name": "HiraganaKatakana" }, { - "title": "KanaMode" + "long_name": "KanaMode" }, { - "title": "KanjiMode" + "long_name": "KanjiMode" }, { - "title": "Katakana" + "long_name": "Katakana" }, { - "title": "Romaji" + "long_name": "Romaji" }, { - "title": "Zenkaku" + "long_name": "Zenkaku" }, { - "title": "ZenkakuHankaku" + "long_name": "ZenkakuHankaku" }, { - "title": "Soft1" + "long_name": "Soft1" }, { - "title": "Soft2" + "long_name": "Soft2" }, { - "title": "Soft3" + "long_name": "Soft3" }, { - "title": "Soft4" + "long_name": "Soft4" }, { - "title": "ChannelDown" + "long_name": "ChannelDown" }, { - "title": "ChannelUp" + "long_name": "ChannelUp" }, { - "title": "Close" + "long_name": "Close" }, { - "title": "MailForward" + "long_name": "MailForward" }, { - "title": "MailReply" + "long_name": "MailReply" }, { - "title": "MailSend" + "long_name": "MailSend" }, { - "title": "MediaClose" + "long_name": "MediaClose" }, { - "title": "MediaFastForward" + "long_name": "MediaFastForward" }, { - "title": "MediaPause" + "long_name": "MediaPause" }, { - "title": "MediaPlay" + "long_name": "MediaPlay" }, { - "title": "MediaPlayPause" + "long_name": "MediaPlayPause" }, { - "title": "MediaRecord" + "long_name": "MediaRecord" }, { - "title": "MediaRewind" + "long_name": "MediaRewind" }, { - "title": "MediaStop" + "long_name": "MediaStop" }, { - "title": "MediaTrackNext" + "long_name": "MediaTrackNext" }, { - "title": "MediaTrackPrevious" + "long_name": "MediaTrackPrevious" }, { - "title": "New" + "long_name": "New" }, { - "title": "Open" + "long_name": "Open" }, { - "title": "Print" + "long_name": "Print" }, { - "title": "Save" + "long_name": "Save" }, { - "title": "SpellCheck" + "long_name": "SpellCheck" }, { - "title": "Key11" + "long_name": "Key11" }, { - "title": "Key12" + "long_name": "Key12" }, { - "title": "AudioBalanceLeft" + "long_name": "AudioBalanceLeft" }, { - "title": "AudioBalanceRight" + "long_name": "AudioBalanceRight" }, { - "title": "AudioBassBoostDown" + "long_name": "AudioBassBoostDown" }, { - "title": "AudioBassBoostToggle" + "long_name": "AudioBassBoostToggle" }, { - "title": "AudioBassBoostUp" + "long_name": "AudioBassBoostUp" }, { - "title": "AudioFaderFront" + "long_name": "AudioFaderFront" }, { - "title": "AudioFaderRear" + "long_name": "AudioFaderRear" }, { - "title": "AudioSurroundModeNext" + "long_name": "AudioSurroundModeNext" }, { - "title": "AudioTrebleDown" + "long_name": "AudioTrebleDown" }, { - "title": "AudioTrebleUp" + "long_name": "AudioTrebleUp" }, { - "title": "AudioVolumeDown" + "long_name": "AudioVolumeDown" }, { - "title": "AudioVolumeUp" + "long_name": "AudioVolumeUp" }, { - "title": "AudioVolumeMute" + "long_name": "AudioVolumeMute" }, { - "title": "MicrophoneToggle" + "long_name": "MicrophoneToggle" }, { - "title": "MicrophoneVolumeDown" + "long_name": "MicrophoneVolumeDown" }, { - "title": "MicrophoneVolumeUp" + "long_name": "MicrophoneVolumeUp" }, { - "title": "MicrophoneVolumeMute" + "long_name": "MicrophoneVolumeMute" }, { - "title": "SpeechCorrectionList" + "long_name": "SpeechCorrectionList" }, { - "title": "SpeechInputToggle" + "long_name": "SpeechInputToggle" }, { - "title": "LaunchApplication1" + "long_name": "LaunchApplication1" }, { - "title": "LaunchApplication2" + "long_name": "LaunchApplication2" }, { - "title": "LaunchCalendar" + "long_name": "LaunchCalendar" }, { - "title": "LaunchContacts" + "long_name": "LaunchContacts" }, { - "title": "LaunchMail" + "long_name": "LaunchMail" }, { - "title": "LaunchMediaPlayer" + "long_name": "LaunchMediaPlayer" }, { - "title": "LaunchMusicPlayer" + "long_name": "LaunchMusicPlayer" }, { - "title": "LaunchPhone" + "long_name": "LaunchPhone" }, { - "title": "LaunchScreenSaver" + "long_name": "LaunchScreenSaver" }, { - "title": "LaunchSpreadsheet" + "long_name": "LaunchSpreadsheet" }, { - "title": "LaunchWebBrowser" + "long_name": "LaunchWebBrowser" }, { - "title": "LaunchWebCam" + "long_name": "LaunchWebCam" }, { - "title": "LaunchWordProcessor" + "long_name": "LaunchWordProcessor" }, { - "title": "BrowserBack" + "long_name": "BrowserBack" }, { - "title": "BrowserFavorites" + "long_name": "BrowserFavorites" }, { - "title": "BrowserForward" + "long_name": "BrowserForward" }, { - "title": "BrowserHome" + "long_name": "BrowserHome" }, { - "title": "BrowserRefresh" + "long_name": "BrowserRefresh" }, { - "title": "BrowserSearch" + "long_name": "BrowserSearch" }, { - "title": "BrowserStop" + "long_name": "BrowserStop" }, { - "title": "AppSwitch" + "long_name": "AppSwitch" }, { - "title": "Call" + "long_name": "Call" }, { - "title": "Camera" + "long_name": "Camera" }, { - "title": "CameraFocus" + "long_name": "CameraFocus" }, { - "title": "EndCall" + "long_name": "EndCall" }, { - "title": "GoBack" + "long_name": "GoBack" }, { - "title": "GoHome" + "long_name": "GoHome" }, { - "title": "HeadsetHook" + "long_name": "HeadsetHook" }, { - "title": "LastNumberRedial" + "long_name": "LastNumberRedial" }, { - "title": "Notification" + "long_name": "Notification" }, { - "title": "MannerMode" + "long_name": "MannerMode" }, { - "title": "VoiceDial" + "long_name": "VoiceDial" }, { - "title": "TV" + "long_name": "TV" }, { - "title": "TV3DMode" + "long_name": "TV3DMode" }, { - "title": "TVAntennaCable" + "long_name": "TVAntennaCable" }, { - "title": "TVAudioDescription" + "long_name": "TVAudioDescription" }, { - "title": "TVAudioDescriptionMixDown" + "long_name": "TVAudioDescriptionMixDown" }, { - "title": "TVAudioDescriptionMixUp" + "long_name": "TVAudioDescriptionMixUp" }, { - "title": "TVContentsMenu" + "long_name": "TVContentsMenu" }, { - "title": "TVDataService" + "long_name": "TVDataService" }, { - "title": "TVInput" + "long_name": "TVInput" }, { - "title": "TVInputComponent1" + "long_name": "TVInputComponent1" }, { - "title": "TVInputComponent2" + "long_name": "TVInputComponent2" }, { - "title": "TVInputComposite1" + "long_name": "TVInputComposite1" }, { - "title": "TVInputComposite2" + "long_name": "TVInputComposite2" }, { - "title": "TVInputHDMI1" + "long_name": "TVInputHDMI1" }, { - "title": "TVInputHDMI2" + "long_name": "TVInputHDMI2" }, { - "title": "TVInputHDMI3" + "long_name": "TVInputHDMI3" }, { - "title": "TVInputHDMI4" + "long_name": "TVInputHDMI4" }, { - "title": "TVInputVGA1" + "long_name": "TVInputVGA1" }, { - "title": "TVMediaContext" + "long_name": "TVMediaContext" }, { - "title": "TVNetwork" + "long_name": "TVNetwork" }, { - "title": "TVNumberEntry" + "long_name": "TVNumberEntry" }, { - "title": "TVPower" + "long_name": "TVPower" }, { - "title": "TVRadioService" + "long_name": "TVRadioService" }, { - "title": "TVSatellite" + "long_name": "TVSatellite" }, { - "title": "TVSatelliteBS" + "long_name": "TVSatelliteBS" }, { - "title": "TVSatelliteCS" + "long_name": "TVSatelliteCS" }, { - "title": "TVSatelliteToggle" + "long_name": "TVSatelliteToggle" }, { - "title": "TVTerrestrialAnalog" + "long_name": "TVTerrestrialAnalog" }, { - "title": "TVTerrestrialDigital" + "long_name": "TVTerrestrialDigital" }, { - "title": "TVTimer" + "long_name": "TVTimer" }, { - "title": "AVRInput" + "long_name": "AVRInput" }, { - "title": "AVRPower" + "long_name": "AVRPower" }, { - "title": "ColorF0Red" + "long_name": "ColorF0Red" }, { - "title": "ColorF1Green" + "long_name": "ColorF1Green" }, { - "title": "ColorF2Yellow" + "long_name": "ColorF2Yellow" }, { - "title": "ColorF3Blue" + "long_name": "ColorF3Blue" }, { - "title": "ColorF4Grey" + "long_name": "ColorF4Grey" }, { - "title": "ColorF5Brown" + "long_name": "ColorF5Brown" }, { - "title": "ClosedCaptionToggle" + "long_name": "ClosedCaptionToggle" }, { - "title": "Dimmer" + "long_name": "Dimmer" }, { - "title": "DisplaySwap" + "long_name": "DisplaySwap" }, { - "title": "DVR" + "long_name": "DVR" }, { - "title": "Exit" + "long_name": "Exit" }, { - "title": "FavoriteClear0" + "long_name": "FavoriteClear0" }, { - "title": "FavoriteClear1" + "long_name": "FavoriteClear1" }, { - "title": "FavoriteClear2" + "long_name": "FavoriteClear2" }, { - "title": "FavoriteClear3" + "long_name": "FavoriteClear3" }, { - "title": "FavoriteRecall0" + "long_name": "FavoriteRecall0" }, { - "title": "FavoriteRecall1" + "long_name": "FavoriteRecall1" }, { - "title": "FavoriteRecall2" + "long_name": "FavoriteRecall2" }, { - "title": "FavoriteRecall3" + "long_name": "FavoriteRecall3" }, { - "title": "FavoriteStore0" + "long_name": "FavoriteStore0" }, { - "title": "FavoriteStore1" + "long_name": "FavoriteStore1" }, { - "title": "FavoriteStore2" + "long_name": "FavoriteStore2" }, { - "title": "FavoriteStore3" + "long_name": "FavoriteStore3" }, { - "title": "Guide" + "long_name": "Guide" }, { - "title": "GuideNextDay" + "long_name": "GuideNextDay" }, { - "title": "GuidePreviousDay" + "long_name": "GuidePreviousDay" }, { - "title": "Info" + "long_name": "Info" }, { - "title": "InstantReplay" + "long_name": "InstantReplay" }, { - "title": "Link" + "long_name": "Link" }, { - "title": "ListProgram" + "long_name": "ListProgram" }, { - "title": "LiveContent" + "long_name": "LiveContent" }, { - "title": "Lock" + "long_name": "Lock" }, { - "title": "MediaApps" + "long_name": "MediaApps" }, { - "title": "MediaAudioTrack" + "long_name": "MediaAudioTrack" }, { - "title": "MediaLast" + "long_name": "MediaLast" }, { - "title": "MediaSkipBackward" + "long_name": "MediaSkipBackward" }, { - "title": "MediaSkipForward" + "long_name": "MediaSkipForward" }, { - "title": "MediaStepBackward" + "long_name": "MediaStepBackward" }, { - "title": "MediaStepForward" + "long_name": "MediaStepForward" }, { - "title": "MediaTopMenu" + "long_name": "MediaTopMenu" }, { - "title": "NavigateIn" + "long_name": "NavigateIn" }, { - "title": "NavigateNext" + "long_name": "NavigateNext" }, { - "title": "NavigateOut" + "long_name": "NavigateOut" }, { - "title": "NavigatePrevious" + "long_name": "NavigatePrevious" }, { - "title": "NextFavoriteChannel" + "long_name": "NextFavoriteChannel" }, { - "title": "NextUserProfile" + "long_name": "NextUserProfile" }, { - "title": "OnDemand" + "long_name": "OnDemand" }, { - "title": "Pairing" + "long_name": "Pairing" }, { - "title": "PinPDown" + "long_name": "PinPDown" }, { - "title": "PinPMove" + "long_name": "PinPMove" }, { - "title": "PinPToggle" + "long_name": "PinPToggle" }, { - "title": "PinPUp" + "long_name": "PinPUp" }, { - "title": "PlaySpeedDown" + "long_name": "PlaySpeedDown" }, { - "title": "PlaySpeedReset" + "long_name": "PlaySpeedReset" }, { - "title": "PlaySpeedUp" + "long_name": "PlaySpeedUp" }, { - "title": "RandomToggle" + "long_name": "RandomToggle" }, { - "title": "RcLowBattery" + "long_name": "RcLowBattery" }, { - "title": "RecordSpeedNext" + "long_name": "RecordSpeedNext" }, { - "title": "RfBypass" + "long_name": "RfBypass" }, { - "title": "ScanChannelsToggle" + "long_name": "ScanChannelsToggle" }, { - "title": "ScreenModeNext" + "long_name": "ScreenModeNext" }, { - "title": "Settings" + "long_name": "Settings" }, { - "title": "SplitScreenToggle" + "long_name": "SplitScreenToggle" }, { - "title": "STBInput" + "long_name": "STBInput" }, { - "title": "STBPower" + "long_name": "STBPower" }, { - "title": "Subtitle" + "long_name": "Subtitle" }, { - "title": "Teletext" + "long_name": "Teletext" }, { - "title": "VideoModeNext" + "long_name": "VideoModeNext" }, { - "title": "Wink" + "long_name": "Wink" }, { - "title": "ZoomToggle" + "long_name": "ZoomToggle" }, { - "title": "F1" + "long_name": "F1" }, { - "title": "F2" + "long_name": "F2" }, { - "title": "F3" + "long_name": "F3" }, { - "title": "F4" + "long_name": "F4" }, { - "title": "F5" + "long_name": "F5" }, { - "title": "F6" + "long_name": "F6" }, { - "title": "F7" + "long_name": "F7" }, { - "title": "F8" + "long_name": "F8" }, { - "title": "F9" + "long_name": "F9" }, { - "title": "F10" + "long_name": "F10" }, { - "title": "F11" + "long_name": "F11" }, { - "title": "F12" + "long_name": "F12" }, { - "title": "F13" + "long_name": "F13" }, { - "title": "F14" + "long_name": "F14" }, { - "title": "F15" + "long_name": "F15" }, { - "title": "F16" + "long_name": "F16" }, { - "title": "F17" + "long_name": "F17" }, { - "title": "F18" + "long_name": "F18" }, { - "title": "F19" + "long_name": "F19" }, { - "title": "F20" + "long_name": "F20" }, { - "title": "F21" + "long_name": "F21" }, { - "title": "F22" + "long_name": "F22" }, { - "title": "F23" + "long_name": "F23" }, { - "title": "F24" + "long_name": "F24" }, { - "title": "F25" + "long_name": "F25" }, { - "title": "F26" + "long_name": "F26" }, { - "title": "F27" + "long_name": "F27" }, { - "title": "F28" + "long_name": "F28" }, { - "title": "F29" + "long_name": "F29" }, { - "title": "F30" + "long_name": "F30" }, { - "title": "F31" + "long_name": "F31" }, { - "title": "F32" + "long_name": "F32" }, { - "title": "F33" + "long_name": "F33" }, { - "title": "F34" + "long_name": "F34" }, { - "title": "F35" + "long_name": "F35" } ], "short_name": "Key", - "title": "bevy_input::keyboard::Key", "type": "object", "typeInfo": "Enum" }, "bevy_input::keyboard::KeyCode": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::KeyCode", "oneOf": [ { "items": false, + "long_name": "Unidentified", "prefixItems": [ { "type": { @@ -6398,595 +5438,593 @@ } ], "short_name": "Unidentified", - "title": "Unidentified", "type": "array", "typeInfo": "Tuple" }, { - "title": "Backquote" + "long_name": "Backquote" }, { - "title": "Backslash" + "long_name": "Backslash" }, { - "title": "BracketLeft" + "long_name": "BracketLeft" }, { - "title": "BracketRight" + "long_name": "BracketRight" }, { - "title": "Comma" + "long_name": "Comma" }, { - "title": "Digit0" + "long_name": "Digit0" }, { - "title": "Digit1" + "long_name": "Digit1" }, { - "title": "Digit2" + "long_name": "Digit2" }, { - "title": "Digit3" + "long_name": "Digit3" }, { - "title": "Digit4" + "long_name": "Digit4" }, { - "title": "Digit5" + "long_name": "Digit5" }, { - "title": "Digit6" + "long_name": "Digit6" }, { - "title": "Digit7" + "long_name": "Digit7" }, { - "title": "Digit8" + "long_name": "Digit8" }, { - "title": "Digit9" + "long_name": "Digit9" }, { - "title": "Equal" + "long_name": "Equal" }, { - "title": "IntlBackslash" + "long_name": "IntlBackslash" }, { - "title": "IntlRo" + "long_name": "IntlRo" }, { - "title": "IntlYen" + "long_name": "IntlYen" }, { - "title": "KeyA" + "long_name": "KeyA" }, { - "title": "KeyB" + "long_name": "KeyB" }, { - "title": "KeyC" + "long_name": "KeyC" }, { - "title": "KeyD" + "long_name": "KeyD" }, { - "title": "KeyE" + "long_name": "KeyE" }, { - "title": "KeyF" + "long_name": "KeyF" }, { - "title": "KeyG" + "long_name": "KeyG" }, { - "title": "KeyH" + "long_name": "KeyH" }, { - "title": "KeyI" + "long_name": "KeyI" }, { - "title": "KeyJ" + "long_name": "KeyJ" }, { - "title": "KeyK" + "long_name": "KeyK" }, { - "title": "KeyL" + "long_name": "KeyL" }, { - "title": "KeyM" + "long_name": "KeyM" }, { - "title": "KeyN" + "long_name": "KeyN" }, { - "title": "KeyO" + "long_name": "KeyO" }, { - "title": "KeyP" + "long_name": "KeyP" }, { - "title": "KeyQ" + "long_name": "KeyQ" }, { - "title": "KeyR" + "long_name": "KeyR" }, { - "title": "KeyS" + "long_name": "KeyS" }, { - "title": "KeyT" + "long_name": "KeyT" }, { - "title": "KeyU" + "long_name": "KeyU" }, { - "title": "KeyV" + "long_name": "KeyV" }, { - "title": "KeyW" + "long_name": "KeyW" }, { - "title": "KeyX" + "long_name": "KeyX" }, { - "title": "KeyY" + "long_name": "KeyY" }, { - "title": "KeyZ" + "long_name": "KeyZ" }, { - "title": "Minus" + "long_name": "Minus" }, { - "title": "Period" + "long_name": "Period" }, { - "title": "Quote" + "long_name": "Quote" }, { - "title": "Semicolon" + "long_name": "Semicolon" }, { - "title": "Slash" + "long_name": "Slash" }, { - "title": "AltLeft" + "long_name": "AltLeft" }, { - "title": "AltRight" + "long_name": "AltRight" }, { - "title": "Backspace" + "long_name": "Backspace" }, { - "title": "CapsLock" + "long_name": "CapsLock" }, { - "title": "ContextMenu" + "long_name": "ContextMenu" }, { - "title": "ControlLeft" + "long_name": "ControlLeft" }, { - "title": "ControlRight" + "long_name": "ControlRight" }, { - "title": "Enter" + "long_name": "Enter" }, { - "title": "SuperLeft" + "long_name": "SuperLeft" }, { - "title": "SuperRight" + "long_name": "SuperRight" }, { - "title": "ShiftLeft" + "long_name": "ShiftLeft" }, { - "title": "ShiftRight" + "long_name": "ShiftRight" }, { - "title": "Space" + "long_name": "Space" }, { - "title": "Tab" + "long_name": "Tab" }, { - "title": "Convert" + "long_name": "Convert" }, { - "title": "KanaMode" + "long_name": "KanaMode" }, { - "title": "Lang1" + "long_name": "Lang1" }, { - "title": "Lang2" + "long_name": "Lang2" }, { - "title": "Lang3" + "long_name": "Lang3" }, { - "title": "Lang4" + "long_name": "Lang4" }, { - "title": "Lang5" + "long_name": "Lang5" }, { - "title": "NonConvert" + "long_name": "NonConvert" }, { - "title": "Delete" + "long_name": "Delete" }, { - "title": "End" + "long_name": "End" }, { - "title": "Help" + "long_name": "Help" }, { - "title": "Home" + "long_name": "Home" }, { - "title": "Insert" + "long_name": "Insert" }, { - "title": "PageDown" + "long_name": "PageDown" }, { - "title": "PageUp" + "long_name": "PageUp" }, { - "title": "ArrowDown" + "long_name": "ArrowDown" }, { - "title": "ArrowLeft" + "long_name": "ArrowLeft" }, { - "title": "ArrowRight" + "long_name": "ArrowRight" }, { - "title": "ArrowUp" + "long_name": "ArrowUp" }, { - "title": "NumLock" + "long_name": "NumLock" }, { - "title": "Numpad0" + "long_name": "Numpad0" }, { - "title": "Numpad1" + "long_name": "Numpad1" }, { - "title": "Numpad2" + "long_name": "Numpad2" }, { - "title": "Numpad3" + "long_name": "Numpad3" }, { - "title": "Numpad4" + "long_name": "Numpad4" }, { - "title": "Numpad5" + "long_name": "Numpad5" }, { - "title": "Numpad6" + "long_name": "Numpad6" }, { - "title": "Numpad7" + "long_name": "Numpad7" }, { - "title": "Numpad8" + "long_name": "Numpad8" }, { - "title": "Numpad9" + "long_name": "Numpad9" }, { - "title": "NumpadAdd" + "long_name": "NumpadAdd" }, { - "title": "NumpadBackspace" + "long_name": "NumpadBackspace" }, { - "title": "NumpadClear" + "long_name": "NumpadClear" }, { - "title": "NumpadClearEntry" + "long_name": "NumpadClearEntry" }, { - "title": "NumpadComma" + "long_name": "NumpadComma" }, { - "title": "NumpadDecimal" + "long_name": "NumpadDecimal" }, { - "title": "NumpadDivide" + "long_name": "NumpadDivide" }, { - "title": "NumpadEnter" + "long_name": "NumpadEnter" }, { - "title": "NumpadEqual" + "long_name": "NumpadEqual" }, { - "title": "NumpadHash" + "long_name": "NumpadHash" }, { - "title": "NumpadMemoryAdd" + "long_name": "NumpadMemoryAdd" }, { - "title": "NumpadMemoryClear" + "long_name": "NumpadMemoryClear" }, { - "title": "NumpadMemoryRecall" + "long_name": "NumpadMemoryRecall" }, { - "title": "NumpadMemoryStore" + "long_name": "NumpadMemoryStore" }, { - "title": "NumpadMemorySubtract" + "long_name": "NumpadMemorySubtract" }, { - "title": "NumpadMultiply" + "long_name": "NumpadMultiply" }, { - "title": "NumpadParenLeft" + "long_name": "NumpadParenLeft" }, { - "title": "NumpadParenRight" + "long_name": "NumpadParenRight" }, { - "title": "NumpadStar" + "long_name": "NumpadStar" }, { - "title": "NumpadSubtract" + "long_name": "NumpadSubtract" }, { - "title": "Escape" + "long_name": "Escape" }, { - "title": "Fn" + "long_name": "Fn" }, { - "title": "FnLock" + "long_name": "FnLock" }, { - "title": "PrintScreen" + "long_name": "PrintScreen" }, { - "title": "ScrollLock" + "long_name": "ScrollLock" }, { - "title": "Pause" + "long_name": "Pause" }, { - "title": "BrowserBack" + "long_name": "BrowserBack" }, { - "title": "BrowserFavorites" + "long_name": "BrowserFavorites" }, { - "title": "BrowserForward" + "long_name": "BrowserForward" }, { - "title": "BrowserHome" + "long_name": "BrowserHome" }, { - "title": "BrowserRefresh" + "long_name": "BrowserRefresh" }, { - "title": "BrowserSearch" + "long_name": "BrowserSearch" }, { - "title": "BrowserStop" + "long_name": "BrowserStop" }, { - "title": "Eject" + "long_name": "Eject" }, { - "title": "LaunchApp1" + "long_name": "LaunchApp1" }, { - "title": "LaunchApp2" + "long_name": "LaunchApp2" }, { - "title": "LaunchMail" + "long_name": "LaunchMail" }, { - "title": "MediaPlayPause" + "long_name": "MediaPlayPause" }, { - "title": "MediaSelect" + "long_name": "MediaSelect" }, { - "title": "MediaStop" + "long_name": "MediaStop" }, { - "title": "MediaTrackNext" + "long_name": "MediaTrackNext" }, { - "title": "MediaTrackPrevious" + "long_name": "MediaTrackPrevious" }, { - "title": "Power" + "long_name": "Power" }, { - "title": "Sleep" + "long_name": "Sleep" }, { - "title": "AudioVolumeDown" + "long_name": "AudioVolumeDown" }, { - "title": "AudioVolumeMute" + "long_name": "AudioVolumeMute" }, { - "title": "AudioVolumeUp" + "long_name": "AudioVolumeUp" }, { - "title": "WakeUp" + "long_name": "WakeUp" }, { - "title": "Meta" + "long_name": "Meta" }, { - "title": "Hyper" + "long_name": "Hyper" }, { - "title": "Turbo" + "long_name": "Turbo" }, { - "title": "Abort" + "long_name": "Abort" }, { - "title": "Resume" + "long_name": "Resume" }, { - "title": "Suspend" + "long_name": "Suspend" }, { - "title": "Again" + "long_name": "Again" }, { - "title": "Copy" + "long_name": "Copy" }, { - "title": "Cut" + "long_name": "Cut" }, { - "title": "Find" + "long_name": "Find" }, { - "title": "Open" + "long_name": "Open" }, { - "title": "Paste" + "long_name": "Paste" }, { - "title": "Props" + "long_name": "Props" }, { - "title": "Select" + "long_name": "Select" }, { - "title": "Undo" + "long_name": "Undo" }, { - "title": "Hiragana" + "long_name": "Hiragana" }, { - "title": "Katakana" + "long_name": "Katakana" }, { - "title": "F1" + "long_name": "F1" }, { - "title": "F2" + "long_name": "F2" }, { - "title": "F3" + "long_name": "F3" }, { - "title": "F4" + "long_name": "F4" }, { - "title": "F5" + "long_name": "F5" }, { - "title": "F6" + "long_name": "F6" }, { - "title": "F7" + "long_name": "F7" }, { - "title": "F8" + "long_name": "F8" }, { - "title": "F9" + "long_name": "F9" }, { - "title": "F10" + "long_name": "F10" }, { - "title": "F11" + "long_name": "F11" }, { - "title": "F12" + "long_name": "F12" }, { - "title": "F13" + "long_name": "F13" }, { - "title": "F14" + "long_name": "F14" }, { - "title": "F15" + "long_name": "F15" }, { - "title": "F16" + "long_name": "F16" }, { - "title": "F17" + "long_name": "F17" }, { - "title": "F18" + "long_name": "F18" }, { - "title": "F19" + "long_name": "F19" }, { - "title": "F20" + "long_name": "F20" }, { - "title": "F21" + "long_name": "F21" }, { - "title": "F22" + "long_name": "F22" }, { - "title": "F23" + "long_name": "F23" }, { - "title": "F24" + "long_name": "F24" }, { - "title": "F25" + "long_name": "F25" }, { - "title": "F26" + "long_name": "F26" }, { - "title": "F27" + "long_name": "F27" }, { - "title": "F28" + "long_name": "F28" }, { - "title": "F29" + "long_name": "F29" }, { - "title": "F30" + "long_name": "F30" }, { - "title": "F31" + "long_name": "F31" }, { - "title": "F32" + "long_name": "F32" }, { - "title": "F33" + "long_name": "F33" }, { - "title": "F34" + "long_name": "F34" }, { - "title": "F35" + "long_name": "F35" } ], "short_name": "KeyCode", - "title": "bevy_input::keyboard::KeyCode", "type": "object", "typeInfo": "Enum" }, @@ -6994,6 +6032,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::KeyboardInput", "properties": { "key_code": { "type": { @@ -7023,19 +6062,20 @@ "window" ], "short_name": "KeyboardInput", - "title": "bevy_input::keyboard::KeyboardInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::keyboard::NativeKey": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::NativeKey", "oneOf": [ { - "title": "Unidentified" + "long_name": "Unidentified" }, { "items": false, + "long_name": "Android", "prefixItems": [ { "type": { @@ -7044,12 +6084,12 @@ } ], "short_name": "Android", - "title": "Android", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "MacOS", "prefixItems": [ { "type": { @@ -7058,12 +6098,12 @@ } ], "short_name": "MacOS", - "title": "MacOS", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Windows", "prefixItems": [ { "type": { @@ -7072,12 +6112,12 @@ } ], "short_name": "Windows", - "title": "Windows", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Xkb", "prefixItems": [ { "type": { @@ -7086,12 +6126,12 @@ } ], "short_name": "Xkb", - "title": "Xkb", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Web", "prefixItems": [ { "type": { @@ -7100,25 +6140,25 @@ } ], "short_name": "Web", - "title": "Web", "type": "array", "typeInfo": "Tuple" } ], "short_name": "NativeKey", - "title": "bevy_input::keyboard::NativeKey", "type": "object", "typeInfo": "Enum" }, "bevy_input::keyboard::NativeKeyCode": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::NativeKeyCode", "oneOf": [ { - "title": "Unidentified" + "long_name": "Unidentified" }, { "items": false, + "long_name": "Android", "prefixItems": [ { "type": { @@ -7127,12 +6167,12 @@ } ], "short_name": "Android", - "title": "Android", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "MacOS", "prefixItems": [ { "type": { @@ -7141,12 +6181,12 @@ } ], "short_name": "MacOS", - "title": "MacOS", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Windows", "prefixItems": [ { "type": { @@ -7155,12 +6195,12 @@ } ], "short_name": "Windows", - "title": "Windows", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Xkb", "prefixItems": [ { "type": { @@ -7169,37 +6209,37 @@ } ], "short_name": "Xkb", - "title": "Xkb", "type": "array", "typeInfo": "Tuple" } ], "short_name": "NativeKeyCode", - "title": "bevy_input::keyboard::NativeKeyCode", "type": "object", "typeInfo": "Enum" }, "bevy_input::mouse::MouseButton": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::mouse::MouseButton", "oneOf": [ { - "title": "Left" + "long_name": "Left" }, { - "title": "Right" + "long_name": "Right" }, { - "title": "Middle" + "long_name": "Middle" }, { - "title": "Back" + "long_name": "Back" }, { - "title": "Forward" + "long_name": "Forward" }, { "items": false, + "long_name": "Other", "prefixItems": [ { "type": { @@ -7208,13 +6248,11 @@ } ], "short_name": "Other", - "title": "Other", "type": "array", "typeInfo": "Tuple" } ], "short_name": "MouseButton", - "title": "bevy_input::mouse::MouseButton", "type": "object", "typeInfo": "Enum" }, @@ -7222,6 +6260,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::mouse::MouseButtonInput", "properties": { "button": { "type": { @@ -7245,31 +6284,32 @@ "window" ], "short_name": "MouseButtonInput", - "title": "bevy_input::mouse::MouseButtonInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::touch::ForceTouch": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::touch::ForceTouch", "oneOf": [ { "additionalProperties": false, + "long_name": "Calibrated", "properties": { "altitude_angle": { - "title": "altitude_angle", + "long_name": "altitude_angle", "type": { "$ref": "#/$defs/core::option::Option" } }, "force": { - "title": "force", + "long_name": "force", "type": { "$ref": "#/$defs/f64" } }, "max_possible_force": { - "title": "max_possible_force", + "long_name": "max_possible_force", "type": { "$ref": "#/$defs/f64" } @@ -7280,12 +6320,12 @@ "max_possible_force" ], "short_name": "Calibrated", - "title": "Calibrated", "type": "object", "typeInfo": "Struct" }, { "items": false, + "long_name": "Normalized", "prefixItems": [ { "type": { @@ -7294,13 +6334,11 @@ } ], "short_name": "Normalized", - "title": "Normalized", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ForceTouch", - "title": "bevy_input::touch::ForceTouch", "type": "object", "typeInfo": "Enum" }, @@ -7308,6 +6346,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::touch::TouchInput", "properties": { "force": { "type": { @@ -7342,13 +6381,13 @@ "id" ], "short_name": "TouchInput", - "title": "bevy_input::touch::TouchInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::touch::TouchPhase": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::touch::TouchPhase", "oneOf": [ "Started", "Moved", @@ -7356,7 +6395,6 @@ "Canceled" ], "short_name": "TouchPhase", - "title": "bevy_input::touch::TouchPhase", "type": "string", "typeInfo": "Enum" }, @@ -7364,6 +6402,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_math::rects::rect::Rect", "properties": { "max": { "type": { @@ -7381,7 +6420,6 @@ "max" ], "short_name": "Rect", - "title": "bevy_math::rects::rect::Rect", "type": "object", "typeInfo": "Struct" }, @@ -7389,6 +6427,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_math::rects::urect::URect", "properties": { "max": { "type": { @@ -7406,7 +6445,6 @@ "max" ], "short_name": "URect", - "title": "bevy_math::rects::urect::URect", "type": "object", "typeInfo": "Struct" }, @@ -7414,10 +6452,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::bundle::CascadesVisibleEntities", "properties": {}, "required": [], "short_name": "CascadesVisibleEntities", - "title": "bevy_pbr::bundle::CascadesVisibleEntities", "type": "object", "typeInfo": "Struct" }, @@ -7425,40 +6463,42 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::bundle::CubemapVisibleEntities", "properties": {}, "required": [], "short_name": "CubemapVisibleEntities", - "title": "bevy_pbr::bundle::CubemapVisibleEntities", "type": "object", "typeInfo": "Struct" }, "bevy_pbr::cluster::ClusterConfig": { "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterConfig", "oneOf": [ { - "title": "None" + "long_name": "None" }, { - "title": "Single" + "long_name": "Single" }, { "additionalProperties": false, + "long_name": "XYZ", "properties": { "dimensions": { - "title": "dimensions", + "long_name": "dimensions", "type": { "$ref": "#/$defs/glam::UVec3" } }, "dynamic_resizing": { - "title": "dynamic_resizing", + "long_name": "dynamic_resizing", "type": { "$ref": "#/$defs/bool" } }, "z_config": { - "title": "z_config", + "long_name": "z_config", "type": { "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" } @@ -7470,33 +6510,33 @@ "dynamic_resizing" ], "short_name": "XYZ", - "title": "XYZ", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "FixedZ", "properties": { "dynamic_resizing": { - "title": "dynamic_resizing", + "long_name": "dynamic_resizing", "type": { "$ref": "#/$defs/bool" } }, "total": { - "title": "total", + "long_name": "total", "type": { "$ref": "#/$defs/u32" } }, "z_config": { - "title": "z_config", + "long_name": "z_config", "type": { "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" } }, "z_slices": { - "title": "z_slices", + "long_name": "z_slices", "type": { "$ref": "#/$defs/u32" } @@ -7509,25 +6549,25 @@ "dynamic_resizing" ], "short_name": "FixedZ", - "title": "FixedZ", "type": "object", "typeInfo": "Struct" } ], "short_name": "ClusterConfig", - "title": "bevy_pbr::cluster::ClusterConfig", "type": "object", "typeInfo": "Enum" }, "bevy_pbr::cluster::ClusterFarZMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterFarZMode", "oneOf": [ { - "title": "MaxClusterableObjectRange" + "long_name": "MaxClusterableObjectRange" }, { "items": false, + "long_name": "Constant", "prefixItems": [ { "type": { @@ -7536,13 +6576,11 @@ } ], "short_name": "Constant", - "title": "Constant", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ClusterFarZMode", - "title": "bevy_pbr::cluster::ClusterFarZMode", "type": "object", "typeInfo": "Enum" }, @@ -7550,6 +6588,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterZConfig", "properties": { "far_z_mode": { "type": { @@ -7567,25 +6606,26 @@ "far_z_mode" ], "short_name": "ClusterZConfig", - "title": "bevy_pbr::cluster::ClusterZConfig", "type": "object", "typeInfo": "Struct" }, "bevy_pbr::fog::FogFalloff": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::fog::FogFalloff", "oneOf": [ { "additionalProperties": false, + "long_name": "Linear", "properties": { "end": { - "title": "end", + "long_name": "end", "type": { "$ref": "#/$defs/f32" } }, "start": { - "title": "start", + "long_name": "start", "type": { "$ref": "#/$defs/f32" } @@ -7596,15 +6636,15 @@ "end" ], "short_name": "Linear", - "title": "Linear", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Exponential", "properties": { "density": { - "title": "density", + "long_name": "density", "type": { "$ref": "#/$defs/f32" } @@ -7614,15 +6654,15 @@ "density" ], "short_name": "Exponential", - "title": "Exponential", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "ExponentialSquared", "properties": { "density": { - "title": "density", + "long_name": "density", "type": { "$ref": "#/$defs/f32" } @@ -7632,21 +6672,21 @@ "density" ], "short_name": "ExponentialSquared", - "title": "ExponentialSquared", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Atmospheric", "properties": { "extinction": { - "title": "extinction", + "long_name": "extinction", "type": { "$ref": "#/$defs/glam::Vec3" } }, "inscattering": { - "title": "inscattering", + "long_name": "inscattering", "type": { "$ref": "#/$defs/glam::Vec3" } @@ -7657,13 +6697,11 @@ "inscattering" ], "short_name": "Atmospheric", - "title": "Atmospheric", "type": "object", "typeInfo": "Struct" } ], "short_name": "FogFalloff", - "title": "bevy_pbr::fog::FogFalloff", "type": "object", "typeInfo": "Enum" }, @@ -7671,6 +6709,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::fog::FogSettings", "properties": { "color": { "type": { @@ -7700,7 +6739,6 @@ "falloff" ], "short_name": "FogSettings", - "title": "bevy_pbr::fog::FogSettings", "type": "object", "typeInfo": "Struct" }, @@ -7708,6 +6746,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::light::Cascade", "properties": { "clip_from_cascade": { "type": { @@ -7737,7 +6776,6 @@ "texel_size" ], "short_name": "Cascade", - "title": "bevy_pbr::light::Cascade", "type": "object", "typeInfo": "Struct" }, @@ -7745,6 +6783,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::CascadeShadowConfig", "properties": { "bounds": { "type": { @@ -7768,7 +6807,6 @@ "minimum_distance" ], "short_name": "CascadeShadowConfig", - "title": "bevy_pbr::light::CascadeShadowConfig", "type": "object", "typeInfo": "Struct" }, @@ -7776,6 +6814,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::Cascades", "properties": { "cascades": { "type": { @@ -7787,7 +6826,6 @@ "cascades" ], "short_name": "Cascades", - "title": "bevy_pbr::light::Cascades", "type": "object", "typeInfo": "Struct" }, @@ -7795,6 +6833,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_pbr::light::DirectionalLightShadowMap", "properties": { "size": { "type": { @@ -7806,7 +6845,6 @@ "size" ], "short_name": "DirectionalLightShadowMap", - "title": "bevy_pbr::light::DirectionalLightShadowMap", "type": "object", "typeInfo": "Struct" }, @@ -7814,10 +6852,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::NotShadowCaster", "properties": {}, "required": [], "short_name": "NotShadowCaster", - "title": "bevy_pbr::light::NotShadowCaster", "type": "object", "typeInfo": "Struct" }, @@ -7825,10 +6863,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::NotShadowReceiver", "properties": {}, "required": [], "short_name": "NotShadowReceiver", - "title": "bevy_pbr::light::NotShadowReceiver", "type": "object", "typeInfo": "Struct" }, @@ -7836,6 +6874,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_pbr::light::PointLightShadowMap", "properties": { "size": { "type": { @@ -7847,20 +6886,19 @@ "size" ], "short_name": "PointLightShadowMap", - "title": "bevy_pbr::light::PointLightShadowMap", "type": "object", "typeInfo": "Struct" }, "bevy_pbr::light::ShadowFilteringMethod": { "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::ShadowFilteringMethod", "oneOf": [ "Hardware2x2", "Gaussian", "Temporal" ], "short_name": "ShadowFilteringMethod", - "title": "bevy_pbr::light::ShadowFilteringMethod", "type": "string", "typeInfo": "Enum" }, @@ -7868,6 +6906,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_pbr::light::ambient_light::AmbientLight", "properties": { "brightness": { "type": { @@ -7885,7 +6924,6 @@ "brightness" ], "short_name": "AmbientLight", - "title": "bevy_pbr::light::ambient_light::AmbientLight", "type": "object", "typeInfo": "Struct" }, @@ -7893,6 +6931,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::directional_light::DirectionalLight", "properties": { "color": { "type": { @@ -7928,7 +6967,6 @@ "shadow_normal_bias" ], "short_name": "DirectionalLight", - "title": "bevy_pbr::light::directional_light::DirectionalLight", "type": "object", "typeInfo": "Struct" }, @@ -7936,6 +6974,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::point_light::PointLight", "properties": { "color": { "type": { @@ -7983,7 +7022,6 @@ "shadow_normal_bias" ], "short_name": "PointLight", - "title": "bevy_pbr::light::point_light::PointLight", "type": "object", "typeInfo": "Struct" }, @@ -7991,6 +7029,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::spot_light::SpotLight", "properties": { "color": { "type": { @@ -8050,7 +7089,6 @@ "inner_angle" ], "short_name": "SpotLight", - "title": "bevy_pbr::light::spot_light::SpotLight", "type": "object", "typeInfo": "Struct" }, @@ -8058,10 +7096,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light_probe::LightProbe", "properties": {}, "required": [], "short_name": "LightProbe", - "title": "bevy_pbr::light_probe::LightProbe", "type": "object", "typeInfo": "Struct" }, @@ -8069,6 +7107,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", "properties": { "diffuse_map": { "type": { @@ -8092,7 +7131,6 @@ "intensity" ], "short_name": "EnvironmentMapLight", - "title": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", "type": "object", "typeInfo": "Struct" }, @@ -8100,6 +7138,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", "properties": { "intensity": { "type": { @@ -8117,7 +7156,6 @@ "intensity" ], "short_name": "IrradianceVolume", - "title": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", "type": "object", "typeInfo": "Struct" }, @@ -8125,6 +7163,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_pbr::material::DefaultOpaqueRendererMethod", "prefixItems": [ { "type": { @@ -8133,35 +7172,36 @@ } ], "short_name": "DefaultOpaqueRendererMethod", - "title": "bevy_pbr::material::DefaultOpaqueRendererMethod", "type": "array", "typeInfo": "TupleStruct" }, "bevy_pbr::material::OpaqueRendererMethod": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::material::OpaqueRendererMethod", "oneOf": [ "Forward", "Deferred", "Auto" ], "short_name": "OpaqueRendererMethod", - "title": "bevy_pbr::material::OpaqueRendererMethod", "type": "string", "typeInfo": "Enum" }, "bevy_pbr::parallax::ParallaxMappingMethod": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::parallax::ParallaxMappingMethod", "oneOf": [ { - "title": "Occlusion" + "long_name": "Occlusion" }, { "additionalProperties": false, + "long_name": "Relief", "properties": { "max_steps": { - "title": "max_steps", + "long_name": "max_steps", "type": { "$ref": "#/$defs/u32" } @@ -8171,13 +7211,11 @@ "max_steps" ], "short_name": "Relief", - "title": "Relief", "type": "object", "typeInfo": "Struct" } ], "short_name": "ParallaxMappingMethod", - "title": "bevy_pbr::parallax::ParallaxMappingMethod", "type": "object", "typeInfo": "Enum" }, @@ -8185,6 +7223,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::pbr_material::StandardMaterial", "properties": { "alpha_mode": { "type": { @@ -8424,49 +7463,50 @@ "uv_transform" ], "short_name": "StandardMaterial", - "title": "bevy_pbr::pbr_material::StandardMaterial", "type": "object", "typeInfo": "Struct" }, "bevy_pbr::pbr_material::UvChannel": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::pbr_material::UvChannel", "oneOf": [ "Uv0", "Uv1" ], "short_name": "UvChannel", - "title": "bevy_pbr::pbr_material::UvChannel", "type": "string", "typeInfo": "Enum" }, "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel", "oneOf": [ { - "title": "Low" + "long_name": "Low" }, { - "title": "Medium" + "long_name": "Medium" }, { - "title": "High" + "long_name": "High" }, { - "title": "Ultra" + "long_name": "Ultra" }, { "additionalProperties": false, + "long_name": "Custom", "properties": { "samples_per_slice_side": { - "title": "samples_per_slice_side", + "long_name": "samples_per_slice_side", "type": { "$ref": "#/$defs/u32" } }, "slice_count": { - "title": "slice_count", + "long_name": "slice_count", "type": { "$ref": "#/$defs/u32" } @@ -8477,13 +7517,11 @@ "samples_per_slice_side" ], "short_name": "Custom", - "title": "Custom", "type": "object", "typeInfo": "Struct" } ], "short_name": "ScreenSpaceAmbientOcclusionQualityLevel", - "title": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel", "type": "object", "typeInfo": "Enum" }, @@ -8491,6 +7529,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings", "properties": { "quality_level": { "type": { @@ -8502,7 +7541,6 @@ "quality_level" ], "short_name": "ScreenSpaceAmbientOcclusionSettings", - "title": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings", "type": "object", "typeInfo": "Struct" }, @@ -8510,6 +7548,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::ssr::ScreenSpaceReflectionsSettings", "properties": { "bisection_steps": { "type": { @@ -8551,7 +7590,6 @@ "use_secant" ], "short_name": "ScreenSpaceReflectionsSettings", - "title": "bevy_pbr::ssr::ScreenSpaceReflectionsSettings", "type": "object", "typeInfo": "Struct" }, @@ -8559,6 +7597,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricFogSettings", "properties": { "absorption": { "type": { @@ -8630,7 +7669,6 @@ "light_intensity" ], "short_name": "VolumetricFogSettings", - "title": "bevy_pbr::volumetric_fog::VolumetricFogSettings", "type": "object", "typeInfo": "Struct" }, @@ -8638,539 +7676,24 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricLight", "properties": {}, "required": [], "short_name": "VolumetricLight", - "title": "bevy_pbr::volumetric_fog::VolumetricLight", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::CoefficientCombineRule": { - "isComponent": false, - "isResource": false, - "oneOf": [ - "Average", - "Min", - "Multiply", - "Max" - ], - "short_name": "CoefficientCombineRule", - "title": "bevy_rapier3d::dynamics::CoefficientCombineRule", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Mass", - "title": "Mass", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::rigid_body::MassProperties" - } - } - ], - "short_name": "MassProperties", - "title": "MassProperties", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "AdditionalMassProperties", - "title": "bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_rapier3d::dynamics::rigid_body::Ccd": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled" - ], - "short_name": "Ccd", - "title": "bevy_rapier3d::dynamics::rigid_body::Ccd", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Damping": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "angular_damping": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "linear_damping": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "linear_damping", - "angular_damping" - ], - "short_name": "Damping", - "title": "bevy_rapier3d::dynamics::rigid_body::Damping", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Dominance": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "groups": { - "type": { - "$ref": "#/$defs/i8" - } - } - }, - "required": [ - "groups" - ], - "short_name": "Dominance", - "title": "bevy_rapier3d::dynamics::rigid_body::Dominance", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::ExternalForce": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "force": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "torque": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "force", - "torque" - ], - "short_name": "ExternalForce", - "title": "bevy_rapier3d::dynamics::rigid_body::ExternalForce", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::ExternalImpulse": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "impulse": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "torque_impulse": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "impulse", - "torque_impulse" - ], - "short_name": "ExternalImpulse", - "title": "bevy_rapier3d::dynamics::rigid_body::ExternalImpulse", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::GravityScale": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "GravityScale", - "title": "bevy_rapier3d::dynamics::rigid_body::GravityScale", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::dynamics::rigid_body::LockedAxes": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u8" - } - } - ], - "short_name": "LockedAxes", - "title": "bevy_rapier3d::dynamics::rigid_body::LockedAxes", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::dynamics::rigid_body::MassProperties": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "local_center_of_mass": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "mass": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "principal_inertia": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "principal_inertia_local_frame": { - "type": { - "$ref": "#/$defs/glam::Quat" - } - } - }, - "required": [ - "local_center_of_mass", - "mass", - "principal_inertia_local_frame", - "principal_inertia" - ], - "short_name": "MassProperties", - "title": "bevy_rapier3d::dynamics::rigid_body::MassProperties", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::RigidBody": { - "isComponent": true, - "isResource": false, - "oneOf": [ - "Dynamic", - "Fixed", - "KinematicPositionBased", - "KinematicVelocityBased" - ], - "short_name": "RigidBody", - "title": "bevy_rapier3d::dynamics::rigid_body::RigidBody", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_rapier3d::dynamics::rigid_body::Sleeping": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "angular_threshold": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "normalized_linear_threshold": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "sleeping": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "normalized_linear_threshold", - "angular_threshold", - "sleeping" - ], - "short_name": "Sleeping", - "title": "bevy_rapier3d::dynamics::rigid_body::Sleeping", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::SoftCcd": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "prediction": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "prediction" - ], - "short_name": "SoftCcd", - "title": "bevy_rapier3d::dynamics::rigid_body::SoftCcd", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Velocity": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "angvel": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "linvel": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "linvel", - "angvel" - ], - "short_name": "Velocity", - "title": "bevy_rapier3d::dynamics::rigid_body::Velocity", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::CollidingEntities": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashSet" - } - } - ], - "short_name": "CollidingEntities", - "title": "bevy_rapier3d::geometry::collider::CollidingEntities", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::CollisionGroups": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "filters": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - }, - "memberships": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - } - }, - "required": [ - "memberships", - "filters" - ], - "short_name": "CollisionGroups", - "title": "bevy_rapier3d::geometry::collider::CollisionGroups", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::ContactForceEventThreshold": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "ContactForceEventThreshold", - "title": "bevy_rapier3d::geometry::collider::ContactForceEventThreshold", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::ContactSkin": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "ContactSkin", - "title": "bevy_rapier3d::geometry::collider::ContactSkin", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::Friction": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "coefficient": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "combine_rule": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::CoefficientCombineRule" - } - } - }, - "required": [ - "coefficient", - "combine_rule" - ], - "short_name": "Friction", - "title": "bevy_rapier3d::geometry::collider::Friction", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::Group": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u32" - } - } - ], - "short_name": "Group", - "title": "bevy_rapier3d::geometry::collider::Group", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::Restitution": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "coefficient": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "combine_rule": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::CoefficientCombineRule" - } - } - }, - "required": [ - "coefficient", - "combine_rule" - ], - "short_name": "Restitution", - "title": "bevy_rapier3d::geometry::collider::Restitution", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::Sensor": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Sensor", - "title": "bevy_rapier3d::geometry::collider::Sensor", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::SolverGroups": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "filters": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - }, - "memberships": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - } - }, - "required": [ - "memberships", - "filters" - ], - "short_name": "SolverGroups", - "title": "bevy_rapier3d::geometry::collider::SolverGroups", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::render::DebugRenderContext": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "properties": { - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled" - ], - "short_name": "DebugRenderContext", - "title": "bevy_rapier3d::render::DebugRenderContext", "type": "object", "typeInfo": "Struct" }, "bevy_render::alpha::AlphaMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::alpha::AlphaMode", "oneOf": [ { - "title": "Opaque" + "long_name": "Opaque" }, { "items": false, + "long_name": "Mask", "prefixItems": [ { "type": { @@ -9179,28 +7702,26 @@ } ], "short_name": "Mask", - "title": "Mask", "type": "array", "typeInfo": "Tuple" }, { - "title": "Blend" + "long_name": "Blend" }, { - "title": "Premultiplied" + "long_name": "Premultiplied" }, { - "title": "AlphaToCoverage" + "long_name": "AlphaToCoverage" }, { - "title": "Add" + "long_name": "Add" }, { - "title": "Multiply" + "long_name": "Multiply" } ], "short_name": "AlphaMode", - "title": "bevy_render::alpha::AlphaMode", "type": "object", "typeInfo": "Enum" }, @@ -9208,6 +7729,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::Camera", "properties": { "clear_color": { "type": { @@ -9248,31 +7770,30 @@ "clear_color" ], "short_name": "Camera", - "title": "bevy_render::camera::camera::Camera", "type": "object", "typeInfo": "Struct" }, "bevy_render::camera::camera::CameraMainTextureUsages": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::CameraMainTextureUsages", "short_name": "CameraMainTextureUsages", - "title": "bevy_render::camera::camera::CameraMainTextureUsages", "type": "object", "typeInfo": "Value" }, "bevy_render::camera::camera::CameraRenderGraph": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::CameraRenderGraph", "short_name": "CameraRenderGraph", - "title": "bevy_render::camera::camera::CameraRenderGraph", "type": "object", "typeInfo": "Value" }, "bevy_render::camera::camera::Exposure": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::Exposure", "short_name": "Exposure", - "title": "bevy_render::camera::camera::Exposure", "type": "object", "typeInfo": "Value" }, @@ -9280,6 +7801,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::camera::camera::MipBias", "prefixItems": [ { "type": { @@ -9288,7 +7810,6 @@ } ], "short_name": "MipBias", - "title": "bevy_render::camera::camera::MipBias", "type": "array", "typeInfo": "TupleStruct" }, @@ -9296,6 +7817,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::TemporalJitter", "properties": { "offset": { "type": { @@ -9307,7 +7829,6 @@ "offset" ], "short_name": "TemporalJitter", - "title": "bevy_render::camera::camera::TemporalJitter", "type": "object", "typeInfo": "Struct" }, @@ -9315,6 +7836,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::camera::camera::Viewport", "properties": { "depth": { "type": { @@ -9338,7 +7860,6 @@ "depth" ], "short_name": "Viewport", - "title": "bevy_render::camera::camera::Viewport", "type": "object", "typeInfo": "Struct" }, @@ -9346,6 +7867,7 @@ "isComponent": false, "isResource": true, "items": false, + "long_name": "bevy_render::camera::clear_color::ClearColor", "prefixItems": [ { "type": { @@ -9354,19 +7876,20 @@ } ], "short_name": "ClearColor", - "title": "bevy_render::camera::clear_color::ClearColor", "type": "array", "typeInfo": "TupleStruct" }, "bevy_render::camera::clear_color::ClearColorConfig": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::camera::clear_color::ClearColorConfig", "oneOf": [ { - "title": "Default" + "long_name": "Default" }, { "items": false, + "long_name": "Custom", "prefixItems": [ { "type": { @@ -9375,16 +7898,14 @@ } ], "short_name": "Custom", - "title": "Custom", "type": "array", "typeInfo": "Tuple" }, { - "title": "None" + "long_name": "None" } ], "short_name": "ClearColorConfig", - "title": "bevy_render::camera::clear_color::ClearColorConfig", "type": "object", "typeInfo": "Enum" }, @@ -9392,6 +7913,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::projection::OrthographicProjection", "properties": { "area": { "type": { @@ -9433,7 +7955,6 @@ "area" ], "short_name": "OrthographicProjection", - "title": "bevy_render::camera::projection::OrthographicProjection", "type": "object", "typeInfo": "Struct" }, @@ -9441,6 +7962,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::projection::PerspectiveProjection", "properties": { "aspect_ratio": { "type": { @@ -9470,16 +7992,17 @@ "far" ], "short_name": "PerspectiveProjection", - "title": "bevy_render::camera::projection::PerspectiveProjection", "type": "object", "typeInfo": "Struct" }, "bevy_render::camera::projection::Projection": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::projection::Projection", "oneOf": [ { "items": false, + "long_name": "Perspective", "prefixItems": [ { "type": { @@ -9488,12 +8011,12 @@ } ], "short_name": "Perspective", - "title": "Perspective", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Orthographic", "prefixItems": [ { "type": { @@ -9502,31 +8025,31 @@ } ], "short_name": "Orthographic", - "title": "Orthographic", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Projection", - "title": "bevy_render::camera::projection::Projection", "type": "object", "typeInfo": "Enum" }, "bevy_render::camera::projection::ScalingMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::camera::projection::ScalingMode", "oneOf": [ { "additionalProperties": false, + "long_name": "Fixed", "properties": { "height": { - "title": "height", + "long_name": "height", "type": { "$ref": "#/$defs/f32" } }, "width": { - "title": "width", + "long_name": "width", "type": { "$ref": "#/$defs/f32" } @@ -9537,12 +8060,12 @@ "height" ], "short_name": "Fixed", - "title": "Fixed", "type": "object", "typeInfo": "Struct" }, { "items": false, + "long_name": "WindowSize", "prefixItems": [ { "type": { @@ -9551,21 +8074,21 @@ } ], "short_name": "WindowSize", - "title": "WindowSize", "type": "array", "typeInfo": "Tuple" }, { "additionalProperties": false, + "long_name": "AutoMin", "properties": { "min_height": { - "title": "min_height", + "long_name": "min_height", "type": { "$ref": "#/$defs/f32" } }, "min_width": { - "title": "min_width", + "long_name": "min_width", "type": { "$ref": "#/$defs/f32" } @@ -9576,21 +8099,21 @@ "min_height" ], "short_name": "AutoMin", - "title": "AutoMin", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "AutoMax", "properties": { "max_height": { - "title": "max_height", + "long_name": "max_height", "type": { "$ref": "#/$defs/f32" } }, "max_width": { - "title": "max_width", + "long_name": "max_width", "type": { "$ref": "#/$defs/f32" } @@ -9601,12 +8124,12 @@ "max_height" ], "short_name": "AutoMax", - "title": "AutoMax", "type": "object", "typeInfo": "Struct" }, { "items": false, + "long_name": "FixedVertical", "prefixItems": [ { "type": { @@ -9615,12 +8138,12 @@ } ], "short_name": "FixedVertical", - "title": "FixedVertical", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "FixedHorizontal", "prefixItems": [ { "type": { @@ -9629,13 +8152,11 @@ } ], "short_name": "FixedHorizontal", - "title": "FixedHorizontal", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ScalingMode", - "title": "bevy_render::camera::projection::ScalingMode", "type": "object", "typeInfo": "Enum" }, @@ -9643,6 +8164,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_render::globals::GlobalsUniform", "properties": { "delta_time": { "type": { @@ -9666,16 +8188,17 @@ "frame_count" ], "short_name": "GlobalsUniform", - "title": "bevy_render::globals::GlobalsUniform", "type": "object", "typeInfo": "Struct" }, "bevy_render::mesh::mesh::Indices": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::mesh::mesh::Indices", "oneOf": [ { "items": false, + "long_name": "U16", "prefixItems": [ { "type": { @@ -9684,12 +8207,12 @@ } ], "short_name": "U16", - "title": "U16", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "U32", "prefixItems": [ { "type": { @@ -9698,13 +8221,11 @@ } ], "short_name": "U32", - "title": "U32", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Indices", - "title": "bevy_render::mesh::mesh::Indices", "type": "object", "typeInfo": "Enum" }, @@ -9712,6 +8233,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::mesh::mesh::Mesh", "properties": { "asset_usage": { "type": { @@ -9738,7 +8260,6 @@ "asset_usage" ], "short_name": "Mesh", - "title": "bevy_render::mesh::mesh::Mesh", "type": "object", "typeInfo": "Struct" }, @@ -9746,6 +8267,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::mesh::mesh::skinning::SkinnedMesh", "properties": { "inverse_bindposes": { "type": { @@ -9763,7 +8285,6 @@ "joints" ], "short_name": "SkinnedMesh", - "title": "bevy_render::mesh::mesh::skinning::SkinnedMesh", "type": "object", "typeInfo": "Struct" }, @@ -9771,6 +8292,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::mesh::morph::MeshMorphWeights", "properties": { "weights": { "type": { @@ -9782,7 +8304,6 @@ "weights" ], "short_name": "MeshMorphWeights", - "title": "bevy_render::mesh::morph::MeshMorphWeights", "type": "object", "typeInfo": "Struct" }, @@ -9790,6 +8311,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::mesh::morph::MorphWeights", "properties": { "first_mesh": { "type": { @@ -9806,7 +8328,6 @@ "weights" ], "short_name": "MorphWeights", - "title": "bevy_render::mesh::morph::MorphWeights", "type": "object", "typeInfo": "Struct" }, @@ -9814,6 +8335,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::Aabb", "properties": { "center": { "type": { @@ -9831,7 +8353,6 @@ "half_extents" ], "short_name": "Aabb", - "title": "bevy_render::primitives::Aabb", "type": "object", "typeInfo": "Struct" }, @@ -9839,10 +8360,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::CascadesFrusta", "properties": {}, "required": [], "short_name": "CascadesFrusta", - "title": "bevy_render::primitives::CascadesFrusta", "type": "object", "typeInfo": "Struct" }, @@ -9850,10 +8371,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::CubemapFrusta", "properties": {}, "required": [], "short_name": "CubemapFrusta", - "title": "bevy_render::primitives::CubemapFrusta", "type": "object", "typeInfo": "Struct" }, @@ -9861,26 +8382,26 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::Frustum", "properties": {}, "required": [], "short_name": "Frustum", - "title": "bevy_render::primitives::Frustum", "type": "object", "typeInfo": "Struct" }, "bevy_render::render_asset::RenderAssetUsages": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::render_asset::RenderAssetUsages", "short_name": "RenderAssetUsages", - "title": "bevy_render::render_asset::RenderAssetUsages", "type": "object", "typeInfo": "Value" }, "bevy_render::texture::image::Image": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::texture::image::Image", "short_name": "Image", - "title": "bevy_render::texture::image::Image", "type": "object", "typeInfo": "Value" }, @@ -9888,6 +8409,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::ColorGrading", "properties": { "global": { "type": { @@ -9917,7 +8439,6 @@ "highlights" ], "short_name": "ColorGrading", - "title": "bevy_render::view::ColorGrading", "type": "object", "typeInfo": "Struct" }, @@ -9925,6 +8446,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::view::ColorGradingGlobal", "properties": { "exposure": { "type": { @@ -9966,7 +8488,6 @@ "midtones_range" ], "short_name": "ColorGradingGlobal", - "title": "bevy_render::view::ColorGradingGlobal", "type": "object", "typeInfo": "Struct" }, @@ -9974,6 +8495,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::view::ColorGradingSection", "properties": { "contrast": { "type": { @@ -10009,13 +8531,13 @@ "lift" ], "short_name": "ColorGradingSection", - "title": "bevy_render::view::ColorGradingSection", "type": "object", "typeInfo": "Struct" }, "bevy_render::view::Msaa": { "isComponent": false, "isResource": true, + "long_name": "bevy_render::view::Msaa", "oneOf": [ "Off", "Sample2", @@ -10023,7 +8545,6 @@ "Sample8" ], "short_name": "Msaa", - "title": "bevy_render::view::Msaa", "type": "string", "typeInfo": "Enum" }, @@ -10031,6 +8552,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::view::visibility::InheritedVisibility", "prefixItems": [ { "type": { @@ -10039,7 +8561,6 @@ } ], "short_name": "InheritedVisibility", - "title": "bevy_render::view::visibility::InheritedVisibility", "type": "array", "typeInfo": "TupleStruct" }, @@ -10047,10 +8568,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::visibility::NoFrustumCulling", "properties": {}, "required": [], "short_name": "NoFrustumCulling", - "title": "bevy_render::view::visibility::NoFrustumCulling", "type": "object", "typeInfo": "Struct" }, @@ -10058,6 +8579,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::view::visibility::ViewVisibility", "prefixItems": [ { "type": { @@ -10066,20 +8588,19 @@ } ], "short_name": "ViewVisibility", - "title": "bevy_render::view::visibility::ViewVisibility", "type": "array", "typeInfo": "TupleStruct" }, "bevy_render::view::visibility::Visibility": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::visibility::Visibility", "oneOf": [ "Inherited", "Hidden", "Visible" ], "short_name": "Visibility", - "title": "bevy_render::view::visibility::Visibility", "type": "string", "typeInfo": "Enum" }, @@ -10087,10 +8608,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::visibility::VisibleEntities", "properties": {}, "required": [], "short_name": "VisibleEntities", - "title": "bevy_render::view::visibility::VisibleEntities", "type": "object", "typeInfo": "Struct" }, @@ -10098,6 +8619,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::view::visibility::range::VisibilityRange", "properties": { "end_margin": { "type": { @@ -10115,7 +8637,6 @@ "end_margin" ], "short_name": "VisibilityRange", - "title": "bevy_render::view::visibility::range::VisibilityRange", "type": "object", "typeInfo": "Struct" }, @@ -10123,6 +8644,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::view::visibility::render_layers::RenderLayers", "prefixItems": [ { "type": { @@ -10131,7 +8653,6 @@ } ], "short_name": "RenderLayers", - "title": "bevy_render::view::visibility::render_layers::RenderLayers", "type": "array", "typeInfo": "TupleStruct" }, @@ -10139,10 +8660,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_sprite::SpriteSource", "properties": {}, "required": [], "short_name": "SpriteSource", - "title": "bevy_sprite::SpriteSource", "type": "object", "typeInfo": "Struct" }, @@ -10150,6 +8671,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::mesh2d::color_material::ColorMaterial", "properties": { "color": { "type": { @@ -10166,7 +8688,6 @@ "color" ], "short_name": "ColorMaterial", - "title": "bevy_sprite::mesh2d::color_material::ColorMaterial", "type": "object", "typeInfo": "Struct" }, @@ -10174,6 +8695,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_sprite::mesh2d::mesh::Mesh2dHandle", "prefixItems": [ { "type": { @@ -10182,43 +8704,44 @@ } ], "short_name": "Mesh2dHandle", - "title": "bevy_sprite::mesh2d::mesh::Mesh2dHandle", "type": "array", "typeInfo": "TupleStruct" }, "bevy_sprite::sprite::Anchor": { "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::sprite::Anchor", "oneOf": [ { - "title": "Center" + "long_name": "Center" }, { - "title": "BottomLeft" + "long_name": "BottomLeft" }, { - "title": "BottomCenter" + "long_name": "BottomCenter" }, { - "title": "BottomRight" + "long_name": "BottomRight" }, { - "title": "CenterLeft" + "long_name": "CenterLeft" }, { - "title": "CenterRight" + "long_name": "CenterRight" }, { - "title": "TopLeft" + "long_name": "TopLeft" }, { - "title": "TopCenter" + "long_name": "TopCenter" }, { - "title": "TopRight" + "long_name": "TopRight" }, { "items": false, + "long_name": "Custom", "prefixItems": [ { "type": { @@ -10227,22 +8750,22 @@ } ], "short_name": "Custom", - "title": "Custom", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Anchor", - "title": "bevy_sprite::sprite::Anchor", "type": "object", "typeInfo": "Enum" }, "bevy_sprite::sprite::ImageScaleMode": { "isComponent": true, "isResource": false, + "long_name": "bevy_sprite::sprite::ImageScaleMode", "oneOf": [ { "items": false, + "long_name": "Sliced", "prefixItems": [ { "type": { @@ -10251,27 +8774,27 @@ } ], "short_name": "Sliced", - "title": "Sliced", "type": "array", "typeInfo": "Tuple" }, { "additionalProperties": false, + "long_name": "Tiled", "properties": { "stretch_value": { - "title": "stretch_value", + "long_name": "stretch_value", "type": { "$ref": "#/$defs/f32" } }, "tile_x": { - "title": "tile_x", + "long_name": "tile_x", "type": { "$ref": "#/$defs/bool" } }, "tile_y": { - "title": "tile_y", + "long_name": "tile_y", "type": { "$ref": "#/$defs/bool" } @@ -10283,13 +8806,11 @@ "stretch_value" ], "short_name": "Tiled", - "title": "Tiled", "type": "object", "typeInfo": "Struct" } ], "short_name": "ImageScaleMode", - "title": "bevy_sprite::sprite::ImageScaleMode", "type": "object", "typeInfo": "Enum" }, @@ -10297,6 +8818,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_sprite::sprite::Sprite", "properties": { "anchor": { "type": { @@ -10336,7 +8858,6 @@ "anchor" ], "short_name": "Sprite", - "title": "bevy_sprite::sprite::Sprite", "type": "object", "typeInfo": "Struct" }, @@ -10344,6 +8865,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_atlas::TextureAtlas", "properties": { "index": { "type": { @@ -10361,7 +8883,6 @@ "index" ], "short_name": "TextureAtlas", - "title": "bevy_sprite::texture_atlas::TextureAtlas", "type": "object", "typeInfo": "Struct" }, @@ -10369,6 +8890,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_atlas::TextureAtlasLayout", "properties": { "size": { "type": { @@ -10391,7 +8913,6 @@ "textures" ], "short_name": "TextureAtlasLayout", - "title": "bevy_sprite::texture_atlas::TextureAtlasLayout", "type": "object", "typeInfo": "Struct" }, @@ -10399,6 +8920,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_slice::border_rect::BorderRect", "properties": { "bottom": { "type": { @@ -10428,22 +8950,23 @@ "bottom" ], "short_name": "BorderRect", - "title": "bevy_sprite::texture_slice::border_rect::BorderRect", "type": "object", "typeInfo": "Struct" }, "bevy_sprite::texture_slice::slicer::SliceScaleMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::SliceScaleMode", "oneOf": [ { - "title": "Stretch" + "long_name": "Stretch" }, { "additionalProperties": false, + "long_name": "Tile", "properties": { "stretch_value": { - "title": "stretch_value", + "long_name": "stretch_value", "type": { "$ref": "#/$defs/f32" } @@ -10453,13 +8976,11 @@ "stretch_value" ], "short_name": "Tile", - "title": "Tile", "type": "object", "typeInfo": "Struct" } ], "short_name": "SliceScaleMode", - "title": "bevy_sprite::texture_slice::slicer::SliceScaleMode", "type": "object", "typeInfo": "Enum" }, @@ -10467,6 +8988,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::TextureSlicer", "properties": { "border": { "type": { @@ -10496,7 +9018,6 @@ "max_corner_scale" ], "short_name": "TextureSlicer", - "title": "bevy_sprite::texture_slice::slicer::TextureSlicer", "type": "object", "typeInfo": "Struct" }, @@ -10504,6 +9025,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_text::font_atlas_set::GlyphAtlasInfo", "properties": { "glyph_index": { "type": { @@ -10527,7 +9049,6 @@ "glyph_index" ], "short_name": "GlyphAtlasInfo", - "title": "bevy_text::font_atlas_set::GlyphAtlasInfo", "type": "object", "typeInfo": "Struct" }, @@ -10535,6 +9056,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_text::glyph_brush::PositionedGlyph", "properties": { "atlas_info": { "type": { @@ -10570,7 +9092,6 @@ "byte_index" ], "short_name": "PositionedGlyph", - "title": "bevy_text::glyph_brush::PositionedGlyph", "type": "object", "typeInfo": "Struct" }, @@ -10578,6 +9099,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_text::pipeline::TextLayoutInfo", "properties": { "glyphs": { "type": { @@ -10595,7 +9117,6 @@ "logical_size" ], "short_name": "TextLayoutInfo", - "title": "bevy_text::pipeline::TextLayoutInfo", "type": "object", "typeInfo": "Struct" }, @@ -10603,6 +9124,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_text::text2d::Text2dBounds", "properties": { "size": { "type": { @@ -10614,33 +9136,32 @@ "size" ], "short_name": "Text2dBounds", - "title": "bevy_text::text2d::Text2dBounds", "type": "object", "typeInfo": "Struct" }, "bevy_text::text::BreakLineOn": { "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::BreakLineOn", "oneOf": [ "WordBoundary", "AnyCharacter", "NoWrap" ], "short_name": "BreakLineOn", - "title": "bevy_text::text::BreakLineOn", "type": "string", "typeInfo": "Enum" }, "bevy_text::text::JustifyText": { "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::JustifyText", "oneOf": [ "Left", "Center", "Right" ], "short_name": "JustifyText", - "title": "bevy_text::text::JustifyText", "type": "string", "typeInfo": "Enum" }, @@ -10648,6 +9169,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_text::text::Text", "properties": { "justify": { "type": { @@ -10671,7 +9193,6 @@ "linebreak_behavior" ], "short_name": "Text", - "title": "bevy_text::text::Text", "type": "object", "typeInfo": "Struct" }, @@ -10679,6 +9200,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::TextSection", "properties": { "style": { "type": { @@ -10696,7 +9218,6 @@ "style" ], "short_name": "TextSection", - "title": "bevy_text::text::TextSection", "type": "object", "typeInfo": "Struct" }, @@ -10704,6 +9225,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::TextStyle", "properties": { "color": { "type": { @@ -10727,7 +9249,6 @@ "color" ], "short_name": "TextStyle", - "title": "bevy_text::text::TextStyle", "type": "object", "typeInfo": "Struct" }, @@ -10735,6 +9256,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::fixed::Fixed", "properties": { "overstep": { "type": { @@ -10752,7 +9274,6 @@ "overstep" ], "short_name": "Fixed", - "title": "bevy_time::fixed::Fixed", "type": "object", "typeInfo": "Struct" }, @@ -10760,6 +9281,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::real::Real", "properties": { "first_update": { "type": { @@ -10781,7 +9303,6 @@ "startup" ], "short_name": "Real", - "title": "bevy_time::real::Real", "type": "object", "typeInfo": "Struct" }, @@ -10789,6 +9310,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::stopwatch::Stopwatch", "properties": { "elapsed": { "type": { @@ -10806,7 +9328,6 @@ "paused" ], "short_name": "Stopwatch", - "title": "bevy_time::stopwatch::Stopwatch", "type": "object", "typeInfo": "Struct" }, @@ -10814,6 +9335,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time<()>", "properties": { "context": { "type": { @@ -10885,7 +9407,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time<()>", - "title": "bevy_time::time::Time<()>", "type": "object", "typeInfo": "Struct" }, @@ -10893,6 +9414,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time", "properties": { "context": { "type": { @@ -10964,7 +9486,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time", - "title": "bevy_time::time::Time", "type": "object", "typeInfo": "Struct" }, @@ -10972,6 +9493,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time", "properties": { "context": { "type": { @@ -11043,7 +9565,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time", - "title": "bevy_time::time::Time", "type": "object", "typeInfo": "Struct" }, @@ -11051,6 +9572,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time", "properties": { "context": { "type": { @@ -11122,7 +9644,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time", - "title": "bevy_time::time::Time", "type": "object", "typeInfo": "Struct" }, @@ -11130,6 +9651,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::timer::Timer", "properties": { "duration": { "type": { @@ -11165,19 +9687,18 @@ "times_finished_this_tick" ], "short_name": "Timer", - "title": "bevy_time::timer::Timer", "type": "object", "typeInfo": "Struct" }, "bevy_time::timer::TimerMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_time::timer::TimerMode", "oneOf": [ "Once", "Repeating" ], "short_name": "TimerMode", - "title": "bevy_time::timer::TimerMode", "type": "string", "typeInfo": "Enum" }, @@ -11185,6 +9706,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::virt::Virtual", "properties": { "effective_speed": { "type": { @@ -11214,7 +9736,6 @@ "effective_speed" ], "short_name": "Virtual", - "title": "bevy_time::virt::Virtual", "type": "object", "typeInfo": "Struct" }, @@ -11222,6 +9743,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_transform::components::global_transform::GlobalTransform", "prefixItems": [ { "type": { @@ -11230,7 +9752,6 @@ } ], "short_name": "GlobalTransform", - "title": "bevy_transform::components::global_transform::GlobalTransform", "type": "array", "typeInfo": "TupleStruct" }, @@ -11238,6 +9759,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_transform::components::transform::Transform", "properties": { "rotation": { "type": { @@ -11261,7 +9783,6 @@ "scale" ], "short_name": "Transform", - "title": "bevy_transform::components::transform::Transform", "type": "object", "typeInfo": "Struct" }, @@ -11269,6 +9790,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_ui::UiScale", "prefixItems": [ { "type": { @@ -11277,32 +9799,31 @@ } ], "short_name": "UiScale", - "title": "bevy_ui::UiScale", "type": "array", "typeInfo": "TupleStruct" }, "bevy_ui::focus::FocusPolicy": { "isComponent": true, "isResource": false, + "long_name": "bevy_ui::focus::FocusPolicy", "oneOf": [ "Block", "Pass" ], "short_name": "FocusPolicy", - "title": "bevy_ui::focus::FocusPolicy", "type": "string", "typeInfo": "Enum" }, "bevy_ui::focus::Interaction": { "isComponent": true, "isResource": false, + "long_name": "bevy_ui::focus::Interaction", "oneOf": [ "Pressed", "Hovered", "None" ], "short_name": "Interaction", - "title": "bevy_ui::focus::Interaction", "type": "string", "typeInfo": "Enum" }, @@ -11310,6 +9831,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::focus::RelativeCursorPosition", "properties": { "normalized": { "type": { @@ -11326,7 +9848,6 @@ "normalized_visible_node_rect" ], "short_name": "RelativeCursorPosition", - "title": "bevy_ui::focus::RelativeCursorPosition", "type": "object", "typeInfo": "Struct" }, @@ -11334,6 +9855,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::geometry::UiRect", "properties": { "bottom": { "type": { @@ -11363,19 +9885,20 @@ "bottom" ], "short_name": "UiRect", - "title": "bevy_ui::geometry::UiRect", "type": "object", "typeInfo": "Struct" }, "bevy_ui::geometry::Val": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::geometry::Val", "oneOf": [ { - "title": "Auto" + "long_name": "Auto" }, { "items": false, + "long_name": "Px", "prefixItems": [ { "type": { @@ -11384,12 +9907,12 @@ } ], "short_name": "Px", - "title": "Px", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Percent", "prefixItems": [ { "type": { @@ -11398,12 +9921,12 @@ } ], "short_name": "Percent", - "title": "Percent", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Vw", "prefixItems": [ { "type": { @@ -11412,12 +9935,12 @@ } ], "short_name": "Vw", - "title": "Vw", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Vh", "prefixItems": [ { "type": { @@ -11426,12 +9949,12 @@ } ], "short_name": "Vh", - "title": "Vh", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "VMin", "prefixItems": [ { "type": { @@ -11440,12 +9963,12 @@ } ], "short_name": "VMin", - "title": "VMin", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "VMax", "prefixItems": [ { "type": { @@ -11454,13 +9977,11 @@ } ], "short_name": "VMax", - "title": "VMax", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Val", - "title": "bevy_ui::geometry::Val", "type": "object", "typeInfo": "Enum" }, @@ -11468,16 +9989,17 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::measurement::ContentSize", "properties": {}, "required": [], "short_name": "ContentSize", - "title": "bevy_ui::measurement::ContentSize", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::AlignContent": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::AlignContent", "oneOf": [ "Default", "Start", @@ -11491,13 +10013,13 @@ "SpaceAround" ], "short_name": "AlignContent", - "title": "bevy_ui::ui_node::AlignContent", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::AlignItems": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::AlignItems", "oneOf": [ "Default", "Start", @@ -11509,13 +10031,13 @@ "Stretch" ], "short_name": "AlignItems", - "title": "bevy_ui::ui_node::AlignItems", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::AlignSelf": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::AlignSelf", "oneOf": [ "Auto", "Start", @@ -11527,7 +10049,6 @@ "Stretch" ], "short_name": "AlignSelf", - "title": "bevy_ui::ui_node::AlignSelf", "type": "string", "typeInfo": "Enum" }, @@ -11535,6 +10056,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_ui::ui_node::BackgroundColor", "prefixItems": [ { "type": { @@ -11543,7 +10065,6 @@ } ], "short_name": "BackgroundColor", - "title": "bevy_ui::ui_node::BackgroundColor", "type": "array", "typeInfo": "TupleStruct" }, @@ -11551,6 +10072,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_ui::ui_node::BorderColor", "prefixItems": [ { "type": { @@ -11559,7 +10081,6 @@ } ], "short_name": "BorderColor", - "title": "bevy_ui::ui_node::BorderColor", "type": "array", "typeInfo": "TupleStruct" }, @@ -11567,6 +10088,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::BorderRadius", "properties": { "bottom_left": { "type": { @@ -11596,7 +10118,6 @@ "bottom_right" ], "short_name": "BorderRadius", - "title": "bevy_ui::ui_node::BorderRadius", "type": "object", "typeInfo": "Struct" }, @@ -11604,6 +10125,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::CalculatedClip", "properties": { "clip": { "type": { @@ -11615,26 +10137,26 @@ "clip" ], "short_name": "CalculatedClip", - "title": "bevy_ui::ui_node::CalculatedClip", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::Direction": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::Direction", "oneOf": [ "Inherit", "LeftToRight", "RightToLeft" ], "short_name": "Direction", - "title": "bevy_ui::ui_node::Direction", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::Display": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::Display", "oneOf": [ "Flex", "Grid", @@ -11642,13 +10164,13 @@ "None" ], "short_name": "Display", - "title": "bevy_ui::ui_node::Display", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::FlexDirection": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::FlexDirection", "oneOf": [ "Row", "Column", @@ -11656,26 +10178,26 @@ "ColumnReverse" ], "short_name": "FlexDirection", - "title": "bevy_ui::ui_node::FlexDirection", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::FlexWrap": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::FlexWrap", "oneOf": [ "NoWrap", "Wrap", "WrapReverse" ], "short_name": "FlexWrap", - "title": "bevy_ui::ui_node::FlexWrap", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::GridAutoFlow": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridAutoFlow", "oneOf": [ "Row", "Column", @@ -11683,7 +10205,6 @@ "ColumnDense" ], "short_name": "GridAutoFlow", - "title": "bevy_ui::ui_node::GridAutoFlow", "type": "string", "typeInfo": "Enum" }, @@ -11691,6 +10212,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridPlacement", "properties": { "end": { "type": { @@ -11710,7 +10232,6 @@ }, "required": [], "short_name": "GridPlacement", - "title": "bevy_ui::ui_node::GridPlacement", "type": "object", "typeInfo": "Struct" }, @@ -11718,6 +10239,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrack", "properties": { "max_sizing_function": { "type": { @@ -11735,16 +10257,17 @@ "max_sizing_function" ], "short_name": "GridTrack", - "title": "bevy_ui::ui_node::GridTrack", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::GridTrackRepetition": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrackRepetition", "oneOf": [ { "items": false, + "long_name": "Count", "prefixItems": [ { "type": { @@ -11753,25 +10276,24 @@ } ], "short_name": "Count", - "title": "Count", "type": "array", "typeInfo": "Tuple" }, { - "title": "AutoFill" + "long_name": "AutoFill" }, { - "title": "AutoFit" + "long_name": "AutoFit" } ], "short_name": "GridTrackRepetition", - "title": "bevy_ui::ui_node::GridTrackRepetition", "type": "object", "typeInfo": "Enum" }, "bevy_ui::ui_node::JustifyContent": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::JustifyContent", "oneOf": [ "Default", "Start", @@ -11785,13 +10307,13 @@ "SpaceAround" ], "short_name": "JustifyContent", - "title": "bevy_ui::ui_node::JustifyContent", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::JustifyItems": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::JustifyItems", "oneOf": [ "Default", "Start", @@ -11801,13 +10323,13 @@ "Stretch" ], "short_name": "JustifyItems", - "title": "bevy_ui::ui_node::JustifyItems", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::JustifySelf": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::JustifySelf", "oneOf": [ "Auto", "Start", @@ -11817,23 +10339,22 @@ "Stretch" ], "short_name": "JustifySelf", - "title": "bevy_ui::ui_node::JustifySelf", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::MaxTrackSizingFunction": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::MaxTrackSizingFunction", "short_name": "MaxTrackSizingFunction", - "title": "bevy_ui::ui_node::MaxTrackSizingFunction", "type": "object", "typeInfo": "Value" }, "bevy_ui::ui_node::MinTrackSizingFunction": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::MinTrackSizingFunction", "short_name": "MinTrackSizingFunction", - "title": "bevy_ui::ui_node::MinTrackSizingFunction", "type": "object", "typeInfo": "Value" }, @@ -11841,6 +10362,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::Node", "properties": { "calculated_size": { "type": { @@ -11876,7 +10398,6 @@ "unrounded_size" ], "short_name": "Node", - "title": "bevy_ui::ui_node::Node", "type": "object", "typeInfo": "Struct" }, @@ -11884,6 +10405,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::Outline", "properties": { "color": { "type": { @@ -11907,7 +10429,6 @@ "color" ], "short_name": "Outline", - "title": "bevy_ui::ui_node::Outline", "type": "object", "typeInfo": "Struct" }, @@ -11915,6 +10436,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::Overflow", "properties": { "x": { "type": { @@ -11932,32 +10454,31 @@ "y" ], "short_name": "Overflow", - "title": "bevy_ui::ui_node::Overflow", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::OverflowAxis": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::OverflowAxis", "oneOf": [ "Visible", "Clip", "Hidden" ], "short_name": "OverflowAxis", - "title": "bevy_ui::ui_node::OverflowAxis", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::PositionType": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::PositionType", "oneOf": [ "Relative", "Absolute" ], "short_name": "PositionType", - "title": "bevy_ui::ui_node::PositionType", "type": "string", "typeInfo": "Enum" }, @@ -11965,6 +10486,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::RepeatedGridTrack", "properties": { "repetition": { "type": { @@ -11982,7 +10504,6 @@ "tracks" ], "short_name": "RepeatedGridTrack", - "title": "bevy_ui::ui_node::RepeatedGridTrack", "type": "object", "typeInfo": "Struct" }, @@ -11990,6 +10511,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::Style", "properties": { "align_content": { "type": { @@ -12222,7 +10744,6 @@ "grid_column" ], "short_name": "Style", - "title": "bevy_ui::ui_node::Style", "type": "object", "typeInfo": "Struct" }, @@ -12230,6 +10751,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_ui::ui_node::TargetCamera", "prefixItems": [ { "type": { @@ -12238,7 +10760,6 @@ } ], "short_name": "TargetCamera", - "title": "bevy_ui::ui_node::TargetCamera", "type": "array", "typeInfo": "TupleStruct" }, @@ -12246,6 +10767,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::UiImage", "properties": { "color": { "type": { @@ -12275,16 +10797,17 @@ "flip_y" ], "short_name": "UiImage", - "title": "bevy_ui::ui_node::UiImage", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::ZIndex": { "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::ZIndex", "oneOf": [ { "items": false, + "long_name": "Local", "prefixItems": [ { "type": { @@ -12293,12 +10816,12 @@ } ], "short_name": "Local", - "title": "Local", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Global", "prefixItems": [ { "type": { @@ -12307,13 +10830,11 @@ } ], "short_name": "Global", - "title": "Global", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ZIndex", - "title": "bevy_ui::ui_node::ZIndex", "type": "object", "typeInfo": "Enum" }, @@ -12321,10 +10842,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::button::Button", "properties": {}, "required": [], "short_name": "Button", - "title": "bevy_ui::widget::button::Button", "type": "object", "typeInfo": "Struct" }, @@ -12332,6 +10853,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::image::UiImageSize", "properties": { "size": { "type": { @@ -12343,7 +10865,6 @@ "size" ], "short_name": "UiImageSize", - "title": "bevy_ui::widget::image::UiImageSize", "type": "object", "typeInfo": "Struct" }, @@ -12351,10 +10872,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::label::Label", "properties": {}, "required": [], "short_name": "Label", - "title": "bevy_ui::widget::label::Label", "type": "object", "typeInfo": "Struct" }, @@ -12362,6 +10883,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::text::TextFlags", "properties": { "needs_new_measure_func": { "type": { @@ -12379,167 +10901,245 @@ "needs_recompute" ], "short_name": "TextFlags", - "title": "bevy_ui::widget::text::TextFlags", "type": "object", "typeInfo": "Struct" }, "bevy_utils::Duration": { "isComponent": false, "isResource": false, + "long_name": "bevy_utils::Duration", "short_name": "Duration", - "title": "bevy_utils::Duration", "type": "object", "typeInfo": "Value" }, "bevy_utils::Instant": { "isComponent": false, "isResource": false, + "long_name": "bevy_utils::Instant", "short_name": "Instant", - "title": "bevy_utils::Instant", "type": "object", "typeInfo": "Value" }, "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { - "additionalProperties": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { "type": { "$ref": "#/$defs/alloc::vec::Vec" } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap, DefaultHashBuilder>", - "title": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", - "type": "object", - "typeInfo": "Map" + } }, "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { - "additionalProperties": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { "type": { "$ref": "#/$defs/bevy_asset::handle::Handle" } - }, + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { "isComponent": false, "isResource": false, - "short_name": "HashMap, DefaultHashBuilder>", - "title": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>, DefaultHashBuilder>", "type": "object", - "typeInfo": "Map" + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } }, "bevy_utils::hashbrown::HashMap": { - "additionalProperties": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>", + "short_name": "HashMap, NoOpHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, usize, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>", + "short_name": "HashMap, EntityHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxis" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::AxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonAxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { "type": { "$ref": "#/$defs/petgraph::graph::NodeIndex" } }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap", - "title": "bevy_utils::hashbrown::HashMap", + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>": { - "additionalProperties": { - "type": { - "$ref": "#/$defs/alloc::vec::Vec" - } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap, NoOpHash>", - "title": "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>", - "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { - "additionalProperties": { - "type": { - "$ref": "#/$defs/usize" - } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap, usize, DefaultHashBuilder>", - "title": "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", - "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>": { - "additionalProperties": { - "type": { - "$ref": "#/$defs/alloc::vec::Vec" - } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap, EntityHash>", - "title": "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>", - "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap": { - "additionalProperties": { - "type": { - "$ref": "#/$defs/bevy_input::gamepad::AxisSettings" - } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap", - "title": "bevy_utils::hashbrown::HashMap", - "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap": { - "additionalProperties": { - "type": { - "$ref": "#/$defs/bevy_input::gamepad::ButtonAxisSettings" - } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap", - "title": "bevy_utils::hashbrown::HashMap", - "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap": { - "additionalProperties": { - "type": { - "$ref": "#/$defs/bevy_input::gamepad::ButtonSettings" - } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap", - "title": "bevy_utils::hashbrown::HashMap", - "type": "object", - "typeInfo": "Map" - }, - "bevy_utils::hashbrown::HashMap": { - "additionalProperties": { + "typeInfo": "Map", + "valueType": { "type": { "$ref": "#/$defs/f32" } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap", - "title": "bevy_utils::hashbrown::HashMap", - "type": "object", - "typeInfo": "Map" + } }, - "bevy_utils::hashbrown::HashSet": { + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { "isComponent": false, "isResource": false, - "short_name": "HashSet", - "title": "bevy_utils::hashbrown::HashSet", + "keyType": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", "type": "object", - "typeInfo": "Value" + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } }, "bevy_window::cursor::CursorIcon": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::cursor::CursorIcon", "oneOf": [ "Default", "ContextMenu", @@ -12577,13 +11177,13 @@ "ZoomOut" ], "short_name": "CursorIcon", - "title": "bevy_window::cursor::CursorIcon", "type": "string", "typeInfo": "Enum" }, "bevy_window::event::AppLifecycle": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::AppLifecycle", "oneOf": [ "Idle", "Running", @@ -12592,7 +11192,6 @@ "WillResume" ], "short_name": "AppLifecycle", - "title": "bevy_window::event::AppLifecycle", "type": "string", "typeInfo": "Enum" }, @@ -12600,6 +11199,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::CursorEntered", "properties": { "window": { "type": { @@ -12611,7 +11211,6 @@ "window" ], "short_name": "CursorEntered", - "title": "bevy_window::event::CursorEntered", "type": "object", "typeInfo": "Struct" }, @@ -12619,6 +11218,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::CursorLeft", "properties": { "window": { "type": { @@ -12630,7 +11230,6 @@ "window" ], "short_name": "CursorLeft", - "title": "bevy_window::event::CursorLeft", "type": "object", "typeInfo": "Struct" }, @@ -12638,6 +11237,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::CursorMoved", "properties": { "delta": { "type": { @@ -12660,25 +11260,26 @@ "position" ], "short_name": "CursorMoved", - "title": "bevy_window::event::CursorMoved", "type": "object", "typeInfo": "Struct" }, "bevy_window::event::FileDragAndDrop": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::FileDragAndDrop", "oneOf": [ { "additionalProperties": false, + "long_name": "DroppedFile", "properties": { "path_buf": { - "title": "path_buf", + "long_name": "path_buf", "type": { "$ref": "#/$defs/std::path::PathBuf" } }, "window": { - "title": "window", + "long_name": "window", "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } @@ -12689,21 +11290,21 @@ "path_buf" ], "short_name": "DroppedFile", - "title": "DroppedFile", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "HoveredFile", "properties": { "path_buf": { - "title": "path_buf", + "long_name": "path_buf", "type": { "$ref": "#/$defs/std::path::PathBuf" } }, "window": { - "title": "window", + "long_name": "window", "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } @@ -12714,15 +11315,15 @@ "path_buf" ], "short_name": "HoveredFile", - "title": "HoveredFile", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "HoveredFileCanceled", "properties": { "window": { - "title": "window", + "long_name": "window", "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } @@ -12732,13 +11333,11 @@ "window" ], "short_name": "HoveredFileCanceled", - "title": "HoveredFileCanceled", "type": "object", "typeInfo": "Struct" } ], "short_name": "FileDragAndDrop", - "title": "bevy_window::event::FileDragAndDrop", "type": "object", "typeInfo": "Enum" }, @@ -12746,6 +11345,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::ReceivedCharacter", "properties": { "char": { "type": { @@ -12763,7 +11363,6 @@ "char" ], "short_name": "ReceivedCharacter", - "title": "bevy_window::event::ReceivedCharacter", "type": "object", "typeInfo": "Struct" }, @@ -12771,10 +11370,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::RequestRedraw", "properties": {}, "required": [], "short_name": "RequestRedraw", - "title": "bevy_window::event::RequestRedraw", "type": "object", "typeInfo": "Struct" }, @@ -12782,6 +11381,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowBackendScaleFactorChanged", "properties": { "scale_factor": { "type": { @@ -12799,7 +11399,6 @@ "scale_factor" ], "short_name": "WindowBackendScaleFactorChanged", - "title": "bevy_window::event::WindowBackendScaleFactorChanged", "type": "object", "typeInfo": "Struct" }, @@ -12807,6 +11406,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowCloseRequested", "properties": { "window": { "type": { @@ -12818,7 +11418,6 @@ "window" ], "short_name": "WindowCloseRequested", - "title": "bevy_window::event::WindowCloseRequested", "type": "object", "typeInfo": "Struct" }, @@ -12826,6 +11425,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowClosed", "properties": { "window": { "type": { @@ -12837,7 +11437,6 @@ "window" ], "short_name": "WindowClosed", - "title": "bevy_window::event::WindowClosed", "type": "object", "typeInfo": "Struct" }, @@ -12845,6 +11444,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowClosing", "properties": { "window": { "type": { @@ -12856,7 +11456,6 @@ "window" ], "short_name": "WindowClosing", - "title": "bevy_window::event::WindowClosing", "type": "object", "typeInfo": "Struct" }, @@ -12864,6 +11463,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowCreated", "properties": { "window": { "type": { @@ -12875,7 +11475,6 @@ "window" ], "short_name": "WindowCreated", - "title": "bevy_window::event::WindowCreated", "type": "object", "typeInfo": "Struct" }, @@ -12883,6 +11482,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowFocused", "properties": { "focused": { "type": { @@ -12900,7 +11500,6 @@ "focused" ], "short_name": "WindowFocused", - "title": "bevy_window::event::WindowFocused", "type": "object", "typeInfo": "Struct" }, @@ -12908,6 +11507,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowMoved", "properties": { "position": { "type": { @@ -12925,7 +11525,6 @@ "position" ], "short_name": "WindowMoved", - "title": "bevy_window::event::WindowMoved", "type": "object", "typeInfo": "Struct" }, @@ -12933,6 +11532,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowOccluded", "properties": { "occluded": { "type": { @@ -12950,7 +11550,6 @@ "occluded" ], "short_name": "WindowOccluded", - "title": "bevy_window::event::WindowOccluded", "type": "object", "typeInfo": "Struct" }, @@ -12958,6 +11557,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowResized", "properties": { "height": { "type": { @@ -12981,7 +11581,6 @@ "height" ], "short_name": "WindowResized", - "title": "bevy_window::event::WindowResized", "type": "object", "typeInfo": "Struct" }, @@ -12989,6 +11588,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowScaleFactorChanged", "properties": { "scale_factor": { "type": { @@ -13006,7 +11606,6 @@ "scale_factor" ], "short_name": "WindowScaleFactorChanged", - "title": "bevy_window::event::WindowScaleFactorChanged", "type": "object", "typeInfo": "Struct" }, @@ -13014,6 +11613,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowThemeChanged", "properties": { "theme": { "type": { @@ -13031,13 +11631,13 @@ "theme" ], "short_name": "WindowThemeChanged", - "title": "bevy_window::event::WindowThemeChanged", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::CompositeAlphaMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::CompositeAlphaMode", "oneOf": [ "Auto", "Opaque", @@ -13046,7 +11646,6 @@ "Inherit" ], "short_name": "CompositeAlphaMode", - "title": "bevy_window::window::CompositeAlphaMode", "type": "string", "typeInfo": "Enum" }, @@ -13054,6 +11653,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::Cursor", "properties": { "grab_mode": { "type": { @@ -13083,20 +11683,19 @@ "hit_test" ], "short_name": "Cursor", - "title": "bevy_window::window::Cursor", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::CursorGrabMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::CursorGrabMode", "oneOf": [ "None", "Confined", "Locked" ], "short_name": "CursorGrabMode", - "title": "bevy_window::window::CursorGrabMode", "type": "string", "typeInfo": "Enum" }, @@ -13104,6 +11703,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::EnabledButtons", "properties": { "close": { "type": { @@ -13127,7 +11727,6 @@ "close" ], "short_name": "EnabledButtons", - "title": "bevy_window::window::EnabledButtons", "type": "object", "typeInfo": "Struct" }, @@ -13135,6 +11734,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::InternalWindowState", "properties": { "maximize_request": { "type": { @@ -13154,22 +11754,23 @@ }, "required": [], "short_name": "InternalWindowState", - "title": "bevy_window::window::InternalWindowState", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::MonitorSelection": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::MonitorSelection", "oneOf": [ { - "title": "Current" + "long_name": "Current" }, { - "title": "Primary" + "long_name": "Primary" }, { "items": false, + "long_name": "Index", "prefixItems": [ { "type": { @@ -13178,19 +11779,18 @@ } ], "short_name": "Index", - "title": "Index", "type": "array", "typeInfo": "Tuple" } ], "short_name": "MonitorSelection", - "title": "bevy_window::window::MonitorSelection", "type": "object", "typeInfo": "Enum" }, "bevy_window::window::PresentMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::PresentMode", "oneOf": [ "AutoVsync", "AutoNoVsync", @@ -13200,7 +11800,6 @@ "Mailbox" ], "short_name": "PresentMode", - "title": "bevy_window::window::PresentMode", "type": "string", "typeInfo": "Enum" }, @@ -13208,10 +11807,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_window::window::PrimaryWindow", "properties": {}, "required": [], "short_name": "PrimaryWindow", - "title": "bevy_window::window::PrimaryWindow", "type": "object", "typeInfo": "Struct" }, @@ -13219,6 +11818,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_window::window::Window", "properties": { "canvas": { "type": { @@ -13393,26 +11993,26 @@ "recognize_doubletap_gesture" ], "short_name": "Window", - "title": "bevy_window::window::Window", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::WindowLevel": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowLevel", "oneOf": [ "AlwaysOnBottom", "Normal", "AlwaysOnTop" ], "short_name": "WindowLevel", - "title": "bevy_window::window::WindowLevel", "type": "string", "typeInfo": "Enum" }, "bevy_window::window::WindowMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowMode", "oneOf": [ "Windowed", "BorderlessFullscreen", @@ -13420,19 +12020,20 @@ "Fullscreen" ], "short_name": "WindowMode", - "title": "bevy_window::window::WindowMode", "type": "string", "typeInfo": "Enum" }, "bevy_window::window::WindowPosition": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowPosition", "oneOf": [ { - "title": "Automatic" + "long_name": "Automatic" }, { "items": false, + "long_name": "Centered", "prefixItems": [ { "type": { @@ -13441,12 +12042,12 @@ } ], "short_name": "Centered", - "title": "Centered", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "At", "prefixItems": [ { "type": { @@ -13455,13 +12056,11 @@ } ], "short_name": "At", - "title": "At", "type": "array", "typeInfo": "Tuple" } ], "short_name": "WindowPosition", - "title": "bevy_window::window::WindowPosition", "type": "object", "typeInfo": "Enum" }, @@ -13469,6 +12068,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowResizeConstraints", "properties": { "max_height": { "type": { @@ -13498,7 +12098,6 @@ "max_height" ], "short_name": "WindowResizeConstraints", - "title": "bevy_window::window::WindowResizeConstraints", "type": "object", "typeInfo": "Struct" }, @@ -13506,6 +12105,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowResolution", "properties": { "physical_height": { "type": { @@ -13534,79 +12134,717 @@ "scale_factor" ], "short_name": "WindowResolution", - "title": "bevy_window::window::WindowResolution", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::WindowTheme": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowTheme", "oneOf": [ "Light", "Dark" ], "short_name": "WindowTheme", - "title": "bevy_window::window::WindowTheme", "type": "string", "typeInfo": "Enum" }, + "blenvy::blueprints::animation::AnimationInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfo", + "properties": { + "frame_end": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_end_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frames_length": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "frame_start", + "frame_end", + "frames_length", + "frame_start_override", + "frame_end_override" + ], + "short_name": "AnimationInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationInfos": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfos", + "properties": { + "animations": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "animations" + ], + "short_name": "AnimationInfos", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationMarkers": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::animation::AnimationMarkers", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "AnimationMarkers", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::animation::BlueprintAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::BlueprintAnimations", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + }, + "named_indices": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations", + "named_indices", + "graph" + ], + "short_name": "BlueprintAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::SceneAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::SceneAnimations", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + }, + "named_indices": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations", + "named_indices", + "graph" + ], + "short_name": "SceneAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::BlueprintAsset": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::BlueprintAsset", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "BlueprintAsset", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::BlueprintAssets": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::BlueprintAssets", + "properties": { + "assets": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "loaded": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "progress": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "assets", + "loaded", + "progress" + ], + "short_name": "BlueprintAssets", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::materials::MaterialInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::materials::MaterialInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "MaterialInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::BlueprintInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::BlueprintInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "BlueprintInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::HideUntilReady": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::HideUntilReady", + "properties": {}, + "required": [], + "short_name": "HideUntilReady", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::SpawnBlueprint": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::SpawnBlueprint", + "properties": {}, + "required": [], + "short_name": "SpawnBlueprint", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::GltfProcessed": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::GltfProcessed", + "properties": {}, + "required": [], + "short_name": "GltfProcessed", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderBackgroundShader": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderBackgroundShader", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "color", + "strength" + ], + "short_name": "BlenderBackgroundShader", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderColorGrading": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderColorGrading", + "properties": { + "exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gamma": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "exposure", + "gamma" + ], + "short_name": "BlenderColorGrading", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderLightShadows": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderLightShadows", + "properties": { + "buffer_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "buffer_bias" + ], + "short_name": "BlenderLightShadows", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderShadowSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderShadowSettings", + "properties": { + "cascade_size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "cascade_size" + ], + "short_name": "BlenderShadowSettings", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderToneMapping": { + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderToneMapping", + "oneOf": [ + "None", + "AgX", + "Filmic" + ], + "short_name": "BlenderToneMapping", + "type": "string", + "typeInfo": "Enum" + }, + "blenvy_animation_example::Fox": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_animation_example::Fox", + "properties": {}, + "required": [], + "short_name": "Fox", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy_animation_example::Player": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_animation_example::Player", + "properties": {}, + "required": [], + "short_name": "Player", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy_animation_example::Robot": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_animation_example::Robot", + "properties": {}, + "required": [], + "short_name": "Robot", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy_animation_example::component_examples::BasicTest": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_animation_example::component_examples::BasicTest", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "c": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "a", + "b", + "c" + ], + "short_name": "BasicTest", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy_animation_example::component_examples::EnumTest": { + "isComponent": true, + "isResource": false, + "long_name": "blenvy_animation_example::component_examples::EnumTest", + "oneOf": [ + "Metal", + "Wood", + "Rock", + "Cloth", + "Squishy", + "None" + ], + "short_name": "EnumTest", + "type": "string", + "typeInfo": "Enum" + }, + "blenvy_animation_example::component_examples::TupleTest2": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleTest2", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + }, + { + "type": { + "$ref": "#/$defs/u64" + } + }, + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "TupleTest2", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleTestBool": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleTestBool", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bool" + } + } + ], + "short_name": "TupleTestBool", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleTestColor": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleTestColor", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "TupleTestColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleTestF32": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleTestF32", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "TupleTestF32", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleTestStr": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleTestStr", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "TupleTestStr", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleTestU64": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleTestU64", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u64" + } + } + ], + "short_name": "TupleTestU64", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleVec": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleVec", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "TupleVec", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleVec2": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleVec2", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "TupleVec2", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::TupleVec3": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_animation_example::component_examples::TupleVec3", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + ], + "short_name": "TupleVec3", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_animation_example::component_examples::UnitTest": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_animation_example::component_examples::UnitTest", + "properties": {}, + "required": [], + "short_name": "UnitTest", + "type": "object", + "typeInfo": "Struct" + }, "bool": { "isComponent": false, "isResource": false, + "long_name": "bool", "short_name": "bool", - "title": "bool", "type": "boolean", "typeInfo": "Value" }, "char": { "isComponent": false, "isResource": false, + "long_name": "char", "short_name": "char", - "title": "char", "type": "string", "typeInfo": "Value" }, "core::num::NonZeroI16": { "isComponent": false, "isResource": false, + "long_name": "core::num::NonZeroI16", "short_name": "NonZeroI16", - "title": "core::num::NonZeroI16", "type": "object", "typeInfo": "Value" }, "core::num::NonZeroU16": { "isComponent": false, "isResource": false, + "long_name": "core::num::NonZeroU16", "short_name": "NonZeroU16", - "title": "core::num::NonZeroU16", "type": "object", "typeInfo": "Value" }, "core::num::NonZeroU32": { "isComponent": false, "isResource": false, + "long_name": "core::num::NonZeroU32", "short_name": "NonZeroU32", - "title": "core::num::NonZeroU32", "type": "object", "typeInfo": "Value" }, "core::ops::Range": { "isComponent": false, "isResource": false, + "long_name": "core::ops::Range", "short_name": "Range", - "title": "core::ops::Range", "type": "object", "typeInfo": "Value" }, "core::option::Option<(u8, u8)>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option<(u8, u8)>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13615,25 +12853,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option<(u8, u8)>", - "title": "core::option::Option<(u8, u8)>", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13642,25 +12880,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13669,25 +12907,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option>", - "title": "core::option::Option>", "type": "object", "typeInfo": "Enum" }, "core::option::Option>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13696,25 +12934,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option>", - "title": "core::option::Option>", "type": "object", "typeInfo": "Enum" }, "core::option::Option>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13723,25 +12961,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option>", - "title": "core::option::Option>", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13750,25 +12988,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13777,25 +13015,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13804,25 +13042,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13831,25 +13069,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13858,25 +13096,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13885,25 +13123,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13912,25 +13150,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13939,25 +13177,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option, usize, DefaultHashBuilder>>", - "title": "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13966,25 +13204,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -13993,25 +13231,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14020,25 +13258,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14047,25 +13285,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14074,25 +13312,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14101,25 +13339,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14128,25 +13366,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14155,25 +13393,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14182,25 +13420,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14209,25 +13447,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -14236,29 +13474,27 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "f32": { "isComponent": false, "isResource": false, + "long_name": "f32", "short_name": "f32", - "title": "f32", "type": "float", "typeInfo": "Value" }, "f64": { "isComponent": false, "isResource": false, + "long_name": "f64", "short_name": "f64", - "title": "f64", "type": "float", "typeInfo": "Value" }, @@ -14266,6 +13502,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Affine2", "properties": { "matrix2": { "type": { @@ -14283,7 +13520,6 @@ "translation" ], "short_name": "Affine2", - "title": "glam::Affine2", "type": "object", "typeInfo": "Struct" }, @@ -14291,6 +13527,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Affine3A", "properties": { "matrix3": { "type": { @@ -14308,7 +13545,6 @@ "translation" ], "short_name": "Affine3A", - "title": "glam::Affine3A", "type": "object", "typeInfo": "Struct" }, @@ -14316,6 +13552,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::DVec2", "properties": { "x": { "type": { @@ -14333,7 +13570,6 @@ "y" ], "short_name": "DVec2", - "title": "glam::DVec2", "type": "object", "typeInfo": "Struct" }, @@ -14341,6 +13577,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::IVec2", "properties": { "x": { "type": { @@ -14358,7 +13595,6 @@ "y" ], "short_name": "IVec2", - "title": "glam::IVec2", "type": "object", "typeInfo": "Struct" }, @@ -14366,6 +13602,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Mat2", "properties": { "x_axis": { "type": { @@ -14383,7 +13620,6 @@ "y_axis" ], "short_name": "Mat2", - "title": "glam::Mat2", "type": "object", "typeInfo": "Struct" }, @@ -14391,6 +13627,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Mat3A", "properties": { "x_axis": { "type": { @@ -14414,7 +13651,6 @@ "z_axis" ], "short_name": "Mat3A", - "title": "glam::Mat3A", "type": "object", "typeInfo": "Struct" }, @@ -14422,6 +13658,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Mat4", "properties": { "w_axis": { "type": { @@ -14451,7 +13688,6 @@ "w_axis" ], "short_name": "Mat4", - "title": "glam::Mat4", "type": "object", "typeInfo": "Struct" }, @@ -14459,6 +13695,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Quat", "properties": { "w": { "type": { @@ -14488,7 +13725,6 @@ "w" ], "short_name": "Quat", - "title": "glam::Quat", "type": "object", "typeInfo": "Struct" }, @@ -14496,6 +13732,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::UVec2", "properties": { "x": { "type": { @@ -14513,7 +13750,6 @@ "y" ], "short_name": "UVec2", - "title": "glam::UVec2", "type": "object", "typeInfo": "Struct" }, @@ -14521,6 +13757,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::UVec3", "properties": { "x": { "type": { @@ -14544,7 +13781,6 @@ "z" ], "short_name": "UVec3", - "title": "glam::UVec3", "type": "object", "typeInfo": "Struct" }, @@ -14552,6 +13788,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec2", "properties": { "x": { "type": { @@ -14569,7 +13806,6 @@ "y" ], "short_name": "Vec2", - "title": "glam::Vec2", "type": "object", "typeInfo": "Struct" }, @@ -14577,6 +13813,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec3", "properties": { "x": { "type": { @@ -14600,7 +13837,6 @@ "z" ], "short_name": "Vec3", - "title": "glam::Vec3", "type": "object", "typeInfo": "Struct" }, @@ -14608,6 +13844,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec3A", "properties": { "x": { "type": { @@ -14631,7 +13868,6 @@ "z" ], "short_name": "Vec3A", - "title": "glam::Vec3A", "type": "object", "typeInfo": "Struct" }, @@ -14639,6 +13875,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec4", "properties": { "w": { "type": { @@ -14668,71 +13905,70 @@ "w" ], "short_name": "Vec4", - "title": "glam::Vec4", "type": "object", "typeInfo": "Struct" }, "i128": { "isComponent": false, "isResource": false, + "long_name": "i128", "short_name": "i128", - "title": "i128", "type": "int", "typeInfo": "Value" }, "i16": { "isComponent": false, "isResource": false, + "long_name": "i16", "short_name": "i16", - "title": "i16", "type": "int", "typeInfo": "Value" }, "i32": { "isComponent": false, "isResource": false, + "long_name": "i32", "short_name": "i32", - "title": "i32", "type": "int", "typeInfo": "Value" }, "i64": { "isComponent": false, "isResource": false, + "long_name": "i64", "short_name": "i64", - "title": "i64", "type": "int", "typeInfo": "Value" }, "i8": { "isComponent": false, "isResource": false, + "long_name": "i8", "short_name": "i8", - "title": "i8", "type": "int", "typeInfo": "Value" }, "isize": { "isComponent": false, "isResource": false, + "long_name": "isize", "short_name": "isize", - "title": "isize", "type": "int", "typeInfo": "Value" }, "petgraph::graph::DiGraph": { "isComponent": false, "isResource": false, + "long_name": "petgraph::graph::DiGraph", "short_name": "DiGraph", - "title": "petgraph::graph::DiGraph", "type": "object", "typeInfo": "Value" }, "petgraph::graph::NodeIndex": { "isComponent": false, "isResource": false, + "long_name": "petgraph::graph::NodeIndex", "short_name": "NodeIndex", - "title": "petgraph::graph::NodeIndex", "type": "object", "typeInfo": "Value" }, @@ -14744,8 +13980,8 @@ "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, + "long_name": "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", "short_name": "SmallVec<[Entity; 8]>", - "title": "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", "type": "array", "typeInfo": "List" }, @@ -14757,8 +13993,8 @@ "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" } }, + "long_name": "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>", "short_name": "SmallVec<[GridTrack; 1]>", - "title": "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>", "type": "array", "typeInfo": "List" }, @@ -14770,105 +14006,110 @@ "$ref": "#/$defs/u64" } }, + "long_name": "smallvec::SmallVec<[u64; 1]>", "short_name": "SmallVec<[u64; 1]>", - "title": "smallvec::SmallVec<[u64; 1]>", "type": "array", "typeInfo": "List" }, "smol_str::SmolStr": { "isComponent": false, "isResource": false, + "long_name": "smol_str::SmolStr", "short_name": "SmolStr", - "title": "smol_str::SmolStr", "type": "object", "typeInfo": "Value" }, "std::collections::BTreeMap": { - "additionalProperties": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "std::collections::BTreeMap", + "short_name": "BTreeMap", + "type": "object", + "typeInfo": "Map", + "valueType": { "type": { "$ref": "#/$defs/bevy_animation::ActiveAnimation" } - }, - "isComponent": false, - "isResource": false, - "short_name": "BTreeMap", - "title": "std::collections::BTreeMap", - "type": "object", - "typeInfo": "Map" + } }, "std::path::PathBuf": { "isComponent": false, "isResource": false, + "long_name": "std::path::PathBuf", "short_name": "PathBuf", - "title": "std::path::PathBuf", "type": "object", "typeInfo": "Value" }, "std::sync::Arc": { "isComponent": false, "isResource": false, + "long_name": "std::sync::Arc", "short_name": "Arc", - "title": "std::sync::Arc", "type": "object", "typeInfo": "Value" }, "u128": { "isComponent": false, "isResource": false, + "long_name": "u128", "short_name": "u128", - "title": "u128", "type": "uint", "typeInfo": "Value" }, "u16": { "isComponent": false, "isResource": false, + "long_name": "u16", "short_name": "u16", - "title": "u16", "type": "uint", "typeInfo": "Value" }, "u32": { "isComponent": false, "isResource": false, + "long_name": "u32", "short_name": "u32", - "title": "u32", "type": "uint", "typeInfo": "Value" }, "u64": { "isComponent": false, "isResource": false, + "long_name": "u64", "short_name": "u64", - "title": "u64", "type": "uint", "typeInfo": "Value" }, "u8": { "isComponent": false, "isResource": false, + "long_name": "u8", "short_name": "u8", - "title": "u8", "type": "uint", "typeInfo": "Value" }, "usize": { "isComponent": false, "isResource": false, + "long_name": "usize", "short_name": "usize", - "title": "usize", "type": "uint", "typeInfo": "Value" }, "uuid::Uuid": { "isComponent": false, "isResource": false, + "long_name": "uuid::Uuid", "short_name": "Uuid", - "title": "uuid::Uuid", "type": "object", "typeInfo": "Value" } }, "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "bevy component registry schema" + "long_name": "bevy component registry schema" } \ No newline at end of file diff --git a/examples/bevy_gltf_components/basic/src/test_components.rs b/examples/blenvy/animation/src/component_examples.rs similarity index 96% rename from examples/bevy_gltf_components/basic/src/test_components.rs rename to examples/blenvy/animation/src/component_examples.rs index b5384e2..e5d7cef 100644 --- a/examples/bevy_gltf_components/basic/src/test_components.rs +++ b/examples/blenvy/animation/src/component_examples.rs @@ -60,8 +60,8 @@ pub enum EnumTest { None, } -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { +pub struct ComponentsExamplesPlugin; +impl Plugin for ComponentsExamplesPlugin { fn build(&self, app: &mut App) { app.register_type::() .register_type::() diff --git a/examples/blenvy/animation/src/main.rs b/examples/blenvy/animation/src/main.rs new file mode 100644 index 0000000..bd29754 --- /dev/null +++ b/examples/blenvy/animation/src/main.rs @@ -0,0 +1,217 @@ +use std::time::Duration; + +use bevy::prelude::*; +use blenvy::{AddToGameWorld, BlenvyPlugin, BluePrintBundle, BlueprintAnimationPlayerLink, BlueprintAnimations, BlueprintInfo, DynamicBlueprintInstance, GameWorldTag, HideUntilReady, SpawnBlueprint}; +use rand::Rng; + +mod component_examples; +use component_examples::*; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// Demo marker component +pub struct Player; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// Demo marker component +pub struct Fox; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// Demo marker component +pub struct Robot; + + +fn main() { + App::new() + .add_plugins(( + DefaultPlugins.set(AssetPlugin::default()), + // our custom plugins + ComponentsExamplesPlugin, // Showcases different type of components /structs + BlenvyPlugin::default() + )) + .register_type::() + .register_type::() + .register_type::() + + .add_systems(Startup, setup_game) + .add_systems(Update, + (animation_control,) + ) + .run(); +} + +// this is how you setup & spawn a level from a blueprint +fn setup_game( + mut commands: Commands, +) { + + // here we actually spawn our game world/level + commands.spawn(( + BlueprintInfo::from_path("levels/World.glb"), // all we need is a Blueprint info... + SpawnBlueprint, // and spawnblueprint to tell blenvy to spawn the blueprint now + HideUntilReady, // only reveal the level once it is ready + GameWorldTag, + )); +} + + +////////////////////////////////// + +pub fn animation_control( + animated_robots: Query<(&BlueprintAnimationPlayerLink, &BlueprintAnimations), With>, + animated_foxes: Query<(&BlueprintAnimationPlayerLink, &BlueprintAnimations), With>, + + mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>, + + keycode: Res>, + // mut entities_with_animations : Query<(&mut AnimationPlayer, &mut BlueprintAnimations)>, +) { + // robots + if keycode.just_pressed(KeyCode::KeyB) { + println!("scan animation for robots"); + for (link, animations) in animated_robots.iter() { + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + println!("got some animations"); + let anim_name = "Scan"; + animation_transitions + .play( + &mut animation_player, + animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(), + Duration::from_secs(5), + ) + .repeat(); + } + } + + // foxes + if keycode.just_pressed(KeyCode::KeyW) { + for (link, animations) in animated_foxes.iter() { + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + + let anim_name = "Walk"; + animation_transitions + .play( + &mut animation_player, + animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(), + Duration::from_secs(5), + ) + .repeat(); + } + } + + if keycode.just_pressed(KeyCode::KeyX) { + for (link, animations) in animated_foxes.iter() { + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + + let anim_name = "Run"; + animation_transitions + .play( + &mut animation_player, + animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(), + Duration::from_secs(5), + ) + .repeat(); + } + } + + if keycode.just_pressed(KeyCode::KeyC) { + for (link, animations) in animated_foxes.iter() { + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + + let anim_name = "Survey"; + animation_transitions + .play( + &mut animation_player, + animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(), + Duration::from_secs(5), + ) + .repeat(); + } + } + + /* Improveement ideas for the future + // a bit more ideal API + if keycode.just_pressed(KeyCode::B) { + for (animation_player, animations) in animated_robots.iter() { + let anim_name = "Scan"; + if animations.named_animations.contains_key(anim_name) { + let clip = animations.named_animations.get(anim_name).unwrap(); + animation_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); + } + } + } + + // even better API + if keycode.just_pressed(KeyCode::B) { + for (animation_player, animations) in animated_robots.iter() { + animation_player.play_with_transition("Scan", Duration::from_secs(5)).repeat(); // with a merged animationPlayer + animations storage + // alternative, perhaps more realistic, and better seperation of concerns + animation_player.play_with_transition(animations, "Scan", Duration::from_secs(5)).repeat(); + + } + }*/ + + /*for (mut anim_player, animations) in entities_with_animations.iter_mut(){ + + if keycode.just_pressed(KeyCode::W) { + let anim_name = "Walk"; + if animations.named_animations.contains_key(anim_name) { + let clip = animations.named_animations.get(anim_name).unwrap(); + anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); + } + } + if keycode.just_pressed(KeyCode::X) { + let anim_name = "Run"; + if animations.named_animations.contains_key(anim_name) { + let clip = animations.named_animations.get(anim_name).unwrap(); + anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); + } + } + if keycode.just_pressed(KeyCode::C) { + let anim_name = "Survey"; + if animations.named_animations.contains_key(anim_name) { + let clip = animations.named_animations.get(anim_name).unwrap(); + anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); + } + } + + + + if keycode.just_pressed(KeyCode::S) { + let anim_name = "Scan"; + if animations.named_animations.contains_key(anim_name) { + let clip = animations.named_animations.get(anim_name).unwrap(); + anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); + } + } + if keycode.just_pressed(KeyCode::I) { + let anim_name = "Idle"; + if animations.named_animations.contains_key(anim_name) { + let clip = animations.named_animations.get(anim_name).unwrap(); + anim_player.play_with_transition(clip.clone(), Duration::from_secs(5)).repeat(); + } + } + }*/ +} diff --git a/examples/blenvy/blueprints/Cargo.toml b/examples/blenvy/blueprints/Cargo.toml new file mode 100644 index 0000000..b1ef7de --- /dev/null +++ b/examples/blenvy/blueprints/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "blenvy_blueprints_example" +version = "0.0.1" +edition = "2021" +license = "MIT OR Apache-2.0" + +[dependencies] +bevy = { version = "0.14", features = ["dynamic_linking"] } +blenvy = { path = "../../../crates/blenvy" } +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/materials/README.md b/examples/blenvy/blueprints/README.md similarity index 77% rename from examples/bevy_gltf_blueprints/materials/README.md rename to examples/blenvy/blueprints/README.md index 2ec70cf..6de5350 100644 --- a/examples/bevy_gltf_blueprints/materials/README.md +++ b/examples/blenvy/blueprints/README.md @@ -2,7 +2,7 @@ # Materials example/demo Example of materials use & reuse (including textures) to avoid redundant materials in blueprints gltfs that lead to asset & memory bloat -- to be used together with ```gltf_auto_export``` version >0.6 with the "materials library" option for exports +- to be used together with ```blenvy``` version >0.6 with the "materials library" option for exports - It shows you how ou can configure```Bevy_gltf_blueprints``` to support material libraries - material library is [here](./assets/materials/) diff --git a/examples/bevy_gltf_blueprints/basic/assets/basic.blend b/examples/blenvy/blueprints/art/basic.blend similarity index 50% rename from examples/bevy_gltf_blueprints/basic/assets/basic.blend rename to examples/blenvy/blueprints/art/basic.blend index e49cf29..a83f513 100644 Binary files a/examples/bevy_gltf_blueprints/basic/assets/basic.blend and b/examples/blenvy/blueprints/art/basic.blend differ diff --git a/examples/bevy_gltf_blueprints/materials/assets/materials.blend b/examples/blenvy/blueprints/art/materials.blend similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/materials.blend rename to examples/blenvy/blueprints/art/materials.blend diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Container.glb b/examples/blenvy/blueprints/assets/blueprints/Container.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Container.glb rename to examples/blenvy/blueprints/assets/blueprints/Container.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Health_Pickup.glb b/examples/blenvy/blueprints/assets/blueprints/Health_Pickup.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Health_Pickup.glb rename to examples/blenvy/blueprints/assets/blueprints/Health_Pickup.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Magic Sphere.glb b/examples/blenvy/blueprints/assets/blueprints/Magic Sphere.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Magic Sphere.glb rename to examples/blenvy/blueprints/assets/blueprints/Magic Sphere.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/MagicTeapot.glb b/examples/blenvy/blueprints/assets/blueprints/MagicTeapot.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/MagicTeapot.glb rename to examples/blenvy/blueprints/assets/blueprints/MagicTeapot.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Pillar.glb b/examples/blenvy/blueprints/assets/blueprints/Pillar.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Pillar.glb rename to examples/blenvy/blueprints/assets/blueprints/Pillar.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Pillar2.glb b/examples/blenvy/blueprints/assets/blueprints/Pillar2.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Pillar2.glb rename to examples/blenvy/blueprints/assets/blueprints/Pillar2.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Player.glb b/examples/blenvy/blueprints/assets/blueprints/Player.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Player.glb rename to examples/blenvy/blueprints/assets/blueprints/Player.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Watermelon cut.glb b/examples/blenvy/blueprints/assets/blueprints/Watermelon cut.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Watermelon cut.glb rename to examples/blenvy/blueprints/assets/blueprints/Watermelon cut.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Watermelon.glb b/examples/blenvy/blueprints/assets/blueprints/Watermelon.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Watermelon.glb rename to examples/blenvy/blueprints/assets/blueprints/Watermelon.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/library/Watermelon2.glb b/examples/blenvy/blueprints/assets/blueprints/Watermelon2.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/library/Watermelon2.glb rename to examples/blenvy/blueprints/assets/blueprints/Watermelon2.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/models/Level1.glb b/examples/blenvy/blueprints/assets/levels/Level1.glb similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/models/Level1.glb rename to examples/blenvy/blueprints/assets/levels/Level1.glb diff --git a/examples/bevy_gltf_blueprints/materials/assets/textures/juicy-watermelon-5882.png b/examples/blenvy/blueprints/assets/textures/juicy-watermelon-5882.png similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/textures/juicy-watermelon-5882.png rename to examples/blenvy/blueprints/assets/textures/juicy-watermelon-5882.png diff --git a/examples/bevy_gltf_blueprints/materials/assets/textures/watermelon-6441.png b/examples/blenvy/blueprints/assets/textures/watermelon-6441.png similarity index 100% rename from examples/bevy_gltf_blueprints/materials/assets/textures/watermelon-6441.png rename to examples/blenvy/blueprints/assets/textures/watermelon-6441.png diff --git a/examples/bevy_gltf_blueprints/materials/src/test_components.rs b/examples/blenvy/blueprints/src/component_examples.rs similarity index 95% rename from examples/bevy_gltf_blueprints/materials/src/test_components.rs rename to examples/blenvy/blueprints/src/component_examples.rs index fd78506..01d5fed 100644 --- a/examples/bevy_gltf_blueprints/materials/src/test_components.rs +++ b/examples/blenvy/blueprints/src/component_examples.rs @@ -56,8 +56,8 @@ pub enum EnumTest { None, } -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { +pub struct ComponentsExamplesPlugin; +impl Plugin for ComponentsExamplesPlugin { fn build(&self, app: &mut App) { app.register_type::() .register_type::() diff --git a/examples/blenvy/blueprints/src/main.rs b/examples/blenvy/blueprints/src/main.rs new file mode 100644 index 0000000..7e80e18 --- /dev/null +++ b/examples/blenvy/blueprints/src/main.rs @@ -0,0 +1,76 @@ +use bevy::prelude::*; +use blenvy::{AddToGameWorld, BlenvyPlugin, BluePrintBundle, BlueprintInfo, DynamicBlueprintInstance, GameWorldTag, HideUntilReady, SpawnBlueprint}; +use rand::Rng; + +mod component_examples; +use component_examples::*; + +fn main() { + App::new() + .add_plugins(( + DefaultPlugins.set(AssetPlugin::default()), + // our custom plugins + ComponentsExamplesPlugin, // Showcases different type of components /structs + BlenvyPlugin::default() + )) + + .add_systems(Startup, setup_game) + .add_systems(Update, spawn_blueprint_instance) + + .run(); +} + +// this is how you setup & spawn a level from a blueprint +fn setup_game( + mut commands: Commands, +) { + + // here we spawn our game world/level, which is also a blueprint ! + commands.spawn(( + BlueprintInfo::from_path("levels/World.glb"), // all we need is a Blueprint info... + SpawnBlueprint, // and spawnblueprint to tell blenvy to spawn the blueprint now + HideUntilReady, // only reveal the level once it is ready + GameWorldTag, + )); +} + + +// you can also spawn blueprint instances at runtime +pub fn spawn_blueprint_instance( + keycode: Res>, + mut commands: Commands, + + mut game_world: Query<(Entity, &Children), With>, +) { + if keycode.just_pressed(KeyCode::KeyS) { + let world = game_world.single_mut(); + let world = world.1[0]; + + let mut rng = rand::thread_rng(); + let range = 5.5; + let x: f32 = rng.gen_range(-range..range); + let y: f32 = rng.gen_range(-range..range); + + let name_index: u64 = rng.gen(); + + let new_entity = commands + .spawn(( + BluePrintBundle { + blueprint: BlueprintInfo { + name: "spawned".into(), + path: "blueprints/Blueprint 3.gltf".into(), + }, // FIXME + ..Default::default() + }, + DynamicBlueprintInstance, + bevy::prelude::Name::from(format!("test{}", name_index)), + HideUntilReady, + AddToGameWorld, + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), + + )) + .id(); + // commands.entity(world).add_child(new_entity); + + } +} \ No newline at end of file diff --git a/examples/blenvy/components/Cargo.toml b/examples/blenvy/components/Cargo.toml new file mode 100644 index 0000000..01ffd42 --- /dev/null +++ b/examples/blenvy/components/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "blenvy_components_example" +version = "0.0.1" +edition = "2021" +license = "MIT OR Apache-2.0" + +[dependencies] +bevy = { version = "0.14", features = ["dynamic_linking"] } +blenvy = { path = "../../../crates/blenvy" } diff --git a/examples/bevy_gltf_blueprints/basic/README.md b/examples/blenvy/components/README.md similarity index 100% rename from examples/bevy_gltf_blueprints/basic/README.md rename to examples/blenvy/components/README.md diff --git a/examples/blenvy/components/art/basic.blend b/examples/blenvy/components/art/basic.blend new file mode 100644 index 0000000..a83f513 Binary files /dev/null and b/examples/blenvy/components/art/basic.blend differ diff --git a/examples/blenvy/components/assets/blueprints/Container.glb b/examples/blenvy/components/assets/blueprints/Container.glb new file mode 100644 index 0000000..3dbec93 Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Container.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Enemy.glb b/examples/blenvy/components/assets/blueprints/Enemy.glb new file mode 100644 index 0000000..04d9d99 Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Enemy.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Finger.glb b/examples/blenvy/components/assets/blueprints/Finger.glb new file mode 100644 index 0000000..4bc77bb Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Finger.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Hand.glb b/examples/blenvy/components/assets/blueprints/Hand.glb new file mode 100644 index 0000000..2065222 Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Hand.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Health_Pickup.glb b/examples/blenvy/components/assets/blueprints/Health_Pickup.glb new file mode 100644 index 0000000..c6f2b8f Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Health_Pickup.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Humanoid_cactus.glb b/examples/blenvy/components/assets/blueprints/Humanoid_cactus.glb new file mode 100644 index 0000000..2427052 Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Humanoid_cactus.glb differ diff --git a/examples/blenvy/components/assets/blueprints/MagicTeapot.glb b/examples/blenvy/components/assets/blueprints/MagicTeapot.glb new file mode 100644 index 0000000..1d0feca Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/MagicTeapot.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Pillar.glb b/examples/blenvy/components/assets/blueprints/Pillar.glb new file mode 100644 index 0000000..1901b38 Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Pillar.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Player.glb b/examples/blenvy/components/assets/blueprints/Player.glb new file mode 100644 index 0000000..09be119 Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Player.glb differ diff --git a/examples/blenvy/components/assets/blueprints/Unused_in_level_test.glb b/examples/blenvy/components/assets/blueprints/Unused_in_level_test.glb new file mode 100644 index 0000000..b2649cc Binary files /dev/null and b/examples/blenvy/components/assets/blueprints/Unused_in_level_test.glb differ diff --git a/examples/blenvy/components/assets/levels/World.glb b/examples/blenvy/components/assets/levels/World.glb new file mode 100644 index 0000000..2541f7a Binary files /dev/null and b/examples/blenvy/components/assets/levels/World.glb differ diff --git a/examples/blenvy/components/assets/registry.json b/examples/blenvy/components/assets/registry.json new file mode 100644 index 0000000..b2c5304 --- /dev/null +++ b/examples/blenvy/components/assets/registry.json @@ -0,0 +1,14082 @@ +{ + "$defs": { + "()": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "()", + "prefixItems": [], + "short_name": "()", + "type": "array", + "typeInfo": "Tuple" + }, + "(u8, u8)": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "(u8, u8)", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u8" + } + }, + { + "type": { + "$ref": "#/$defs/u8" + } + } + ], + "short_name": "(u8, u8)", + "type": "array", + "typeInfo": "Tuple" + }, + "alloc::borrow::Cow": { + "isComponent": false, + "isResource": false, + "long_name": "alloc::borrow::Cow", + "short_name": "Cow", + "type": "object", + "typeInfo": "Value" + }, + "alloc::string::String": { + "isComponent": false, + "isResource": false, + "long_name": "alloc::string::String", + "short_name": "String", + "type": "string", + "typeInfo": "Value" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_animation::VariableCurve" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_animation::transition::AnimationTransition" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_math::rects::urect::URect" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_pbr::light::Cascade" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_text::glyph_brush::PositionedGlyph" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_text::text::TextSection" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::RepeatedGridTrack" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::animation::AnimationInfo" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::assets::BlueprintAsset" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/glam::Quat" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u16" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "bevy_animation::AnimationClip": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::AnimationClip", + "properties": { + "curves": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>" + } + }, + "duration": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "curves", + "duration" + ], + "short_name": "AnimationClip", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::AnimationPlayer": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_animation::AnimationPlayer", + "properties": { + "active_animations": { + "type": { + "$ref": "#/$defs/std::collections::BTreeMap" + } + }, + "blend_weights": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "active_animations", + "blend_weights" + ], + "short_name": "AnimationPlayer", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::AnimationTarget": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_animation::AnimationTarget", + "properties": { + "id": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "player": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "id", + "player" + ], + "short_name": "AnimationTarget", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::AnimationTargetId": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_animation::AnimationTargetId", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + ], + "short_name": "AnimationTargetId", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_animation::Interpolation": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::Interpolation", + "oneOf": [ + "Linear", + "Step", + "CubicSpline" + ], + "short_name": "Interpolation", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_animation::Keyframes": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::Keyframes", + "oneOf": [ + { + "items": false, + "long_name": "Rotation", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Rotation", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Translation", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Translation", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Scale", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Scale", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weights", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Weights", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Keyframes", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_animation::VariableCurve": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::VariableCurve", + "properties": { + "interpolation": { + "type": { + "$ref": "#/$defs/bevy_animation::Interpolation" + } + }, + "keyframe_timestamps": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "keyframes": { + "type": { + "$ref": "#/$defs/bevy_animation::Keyframes" + } + } + }, + "required": [ + "keyframe_timestamps", + "keyframes", + "interpolation" + ], + "short_name": "VariableCurve", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::graph::AnimationGraph": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::graph::AnimationGraph", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/petgraph::graph::DiGraph" + } + }, + "root": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + }, + "required": [ + "graph", + "root" + ], + "short_name": "AnimationGraph", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::transition::AnimationTransition": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransition", + "properties": { + "animation": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "current_weight": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "weight_decline_per_sec": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "current_weight", + "weight_decline_per_sec", + "animation" + ], + "short_name": "AnimationTransition", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::transition::AnimationTransitions": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransitions", + "properties": { + "main_animation": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "transitions": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "transitions" + ], + "short_name": "AnimationTransitions", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_asset::assets::AssetIndex": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::assets::AssetIndex", + "properties": { + "generation": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "index": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "generation", + "index" + ], + "short_name": "AssetIndex", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_asset::handle::Handle<()>": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle<()>", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId<()>" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle<()>", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId<()>": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId<()>", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId<()>", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::path::AssetPath": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::path::AssetPath", + "short_name": "AssetPath", + "type": "object", + "typeInfo": "Value" + }, + "bevy_audio::audio::DefaultSpatialScale": { + "isComponent": false, + "isResource": true, + "items": false, + "long_name": "bevy_audio::audio::DefaultSpatialScale", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_audio::audio::SpatialScale" + } + } + ], + "short_name": "DefaultSpatialScale", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_audio::audio::GlobalVolume": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_audio::audio::GlobalVolume", + "properties": { + "volume": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::Volume" + } + } + }, + "required": [ + "volume" + ], + "short_name": "GlobalVolume", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::PlaybackMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_audio::audio::PlaybackMode", + "oneOf": [ + "Once", + "Loop", + "Despawn", + "Remove" + ], + "short_name": "PlaybackMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_audio::audio::PlaybackSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_audio::audio::PlaybackSettings", + "properties": { + "mode": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::PlaybackMode" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "spatial": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "spatial_scale": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "speed": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "volume": { + "type": { + "$ref": "#/$defs/bevy_audio::audio::Volume" + } + } + }, + "required": [ + "mode", + "volume", + "speed", + "paused", + "spatial" + ], + "short_name": "PlaybackSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::SpatialListener": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_audio::audio::SpatialListener", + "properties": { + "left_ear_offset": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "right_ear_offset": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "left_ear_offset", + "right_ear_offset" + ], + "short_name": "SpatialListener", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_audio::audio::SpatialScale": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_audio::audio::SpatialScale", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + ], + "short_name": "SpatialScale", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_audio::audio::Volume": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_audio::audio::Volume", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Volume", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_color::color::Color": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::color::Color", + "oneOf": [ + { + "items": false, + "long_name": "Srgba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::srgba::Srgba" + } + } + ], + "short_name": "Srgba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "LinearRgba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::linear_rgba::LinearRgba" + } + } + ], + "short_name": "LinearRgba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hsla", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hsla::Hsla" + } + } + ], + "short_name": "Hsla", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hsva", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hsva::Hsva" + } + } + ], + "short_name": "Hsva", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hwba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hwba::Hwba" + } + } + ], + "short_name": "Hwba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Laba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::laba::Laba" + } + } + ], + "short_name": "Laba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Lcha", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::lcha::Lcha" + } + } + ], + "short_name": "Lcha", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Oklaba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::oklaba::Oklaba" + } + } + ], + "short_name": "Oklaba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Oklcha", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::oklcha::Oklcha" + } + } + ], + "short_name": "Oklcha", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Xyza", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::xyza::Xyza" + } + } + ], + "short_name": "Xyza", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Color", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_color::hsla::Hsla": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hsla::Hsla", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "saturation", + "lightness", + "alpha" + ], + "short_name": "Hsla", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::hsva::Hsva": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hsva::Hsva", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "saturation", + "value", + "alpha" + ], + "short_name": "Hsva", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::hwba::Hwba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hwba::Hwba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blackness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "whiteness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "whiteness", + "blackness", + "alpha" + ], + "short_name": "Hwba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::laba::Laba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::laba::Laba", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "a", + "b", + "alpha" + ], + "short_name": "Laba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::lcha::Lcha": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::lcha::Lcha", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "chroma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "chroma", + "hue", + "alpha" + ], + "short_name": "Lcha", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::linear_rgba::LinearRgba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::linear_rgba::LinearRgba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "green": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "red": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "short_name": "LinearRgba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::oklaba::Oklaba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::oklaba::Oklaba", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "a", + "b", + "alpha" + ], + "short_name": "Oklaba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::oklcha::Oklcha": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::oklcha::Oklcha", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "chroma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "chroma", + "hue", + "alpha" + ], + "short_name": "Oklcha", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::srgba::Srgba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::srgba::Srgba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "green": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "red": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "short_name": "Srgba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::xyza::Xyza": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::xyza::Xyza", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z", + "alpha" + ], + "short_name": "Xyza", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core::name::Name": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core::name::Name", + "properties": { + "hash": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "name": { + "type": { + "$ref": "#/$defs/alloc::borrow::Cow" + } + } + }, + "required": [ + "hash", + "name" + ], + "short_name": "Name", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::bloom::settings::BloomCompositeMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomCompositeMode", + "oneOf": [ + "EnergyConserving", + "Additive" + ], + "short_name": "BloomCompositeMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::bloom::settings::BloomPrefilterSettings": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomPrefilterSettings", + "properties": { + "threshold": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "threshold_softness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "threshold", + "threshold_softness" + ], + "short_name": "BloomPrefilterSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::bloom::settings::BloomSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomSettings", + "properties": { + "composite_mode": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::bloom::settings::BloomCompositeMode" + } + }, + "high_pass_frequency": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "low_frequency_boost": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "low_frequency_boost_curvature": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "prefilter_settings": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::bloom::settings::BloomPrefilterSettings" + } + } + }, + "required": [ + "intensity", + "low_frequency_boost", + "low_frequency_boost_curvature", + "high_pass_frequency", + "prefilter_settings", + "composite_mode" + ], + "short_name": "BloomSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings", + "properties": { + "denoise": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "sharpening_strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "enabled", + "sharpening_strength", + "denoise" + ], + "short_name": "ContrastAdaptiveSharpeningSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::core_2d::camera_2d::Camera2d": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", + "properties": {}, + "required": [], + "short_name": "Camera2d", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::core_3d::camera_3d::Camera3d": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3d", + "properties": { + "depth_load_op": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp" + } + }, + "depth_texture_usages": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage" + } + }, + "screen_space_specular_transmission_quality": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality" + } + }, + "screen_space_specular_transmission_steps": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "depth_load_op", + "depth_texture_usages", + "screen_space_specular_transmission_steps", + "screen_space_specular_transmission_quality" + ], + "short_name": "Camera3d", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp", + "oneOf": [ + { + "items": false, + "long_name": "Clear", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Clear", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Load" + } + ], + "short_name": "Camera3dDepthLoadOp", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Camera3dDepthTextureUsage", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality": { + "isComponent": false, + "isResource": true, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra" + ], + "short_name": "ScreenSpaceTransmissionQuality", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::fxaa::Fxaa": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Fxaa", + "properties": { + "edge_threshold": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::fxaa::Sensitivity" + } + }, + "edge_threshold_min": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::fxaa::Sensitivity" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "edge_threshold", + "edge_threshold_min" + ], + "short_name": "Fxaa", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::fxaa::Sensitivity": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Sensitivity", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra", + "Extreme" + ], + "short_name": "Sensitivity", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::prepass::DeferredPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::prepass::DeferredPrepass", + "properties": {}, + "required": [], + "short_name": "DeferredPrepass", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::prepass::DepthPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::prepass::DepthPrepass", + "properties": {}, + "required": [], + "short_name": "DepthPrepass", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::prepass::MotionVectorPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::prepass::MotionVectorPrepass", + "properties": {}, + "required": [], + "short_name": "MotionVectorPrepass", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::prepass::NormalPrepass": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::prepass::NormalPrepass", + "properties": {}, + "required": [], + "short_name": "NormalPrepass", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::smaa::SmaaPreset": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaPreset", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra" + ], + "short_name": "SmaaPreset", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::smaa::SmaaSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaSettings", + "properties": { + "preset": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::smaa::SmaaPreset" + } + } + }, + "required": [ + "preset" + ], + "short_name": "SmaaSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::tonemapping::DebandDither": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::tonemapping::DebandDither", + "oneOf": [ + "Disabled", + "Enabled" + ], + "short_name": "DebandDither", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::tonemapping::Tonemapping": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::tonemapping::Tonemapping", + "oneOf": [ + "None", + "Reinhard", + "ReinhardLuminance", + "AcesFitted", + "AgX", + "SomewhatBoringDisplayTransform", + "TonyMcMapface", + "BlenderFilmic" + ], + "short_name": "Tonemapping", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ecs::entity::Entity": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ecs::entity::Entity", + "short_name": "Entity", + "type": "object", + "typeInfo": "Value" + }, + "bevy_gizmos::aabb::AabbGizmoConfigGroup": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::aabb::AabbGizmoConfigGroup", + "properties": { + "default_color": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "draw_all": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "draw_all" + ], + "short_name": "AabbGizmoConfigGroup", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoConfig": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoConfig", + "properties": { + "depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "line_joints": { + "type": { + "$ref": "#/$defs/bevy_gizmos::config::GizmoLineJoint" + } + }, + "line_perspective": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "line_style": { + "type": { + "$ref": "#/$defs/bevy_gizmos::config::GizmoLineStyle" + } + }, + "line_width": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "render_layers": { + "type": { + "$ref": "#/$defs/bevy_render::view::visibility::render_layers::RenderLayers" + } + } + }, + "required": [ + "enabled", + "line_width", + "line_perspective", + "line_style", + "depth_bias", + "render_layers", + "line_joints" + ], + "short_name": "GizmoConfig", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoConfigStore": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_gizmos::config::GizmoConfigStore", + "properties": {}, + "required": [], + "short_name": "GizmoConfigStore", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoLineJoint": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineJoint", + "oneOf": [ + { + "long_name": "None" + }, + { + "long_name": "Miter" + }, + { + "items": false, + "long_name": "Round", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Round", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Bevel" + } + ], + "short_name": "GizmoLineJoint", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_gizmos::config::GizmoLineStyle": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineStyle", + "oneOf": [ + "Solid", + "Dotted" + ], + "short_name": "GizmoLineStyle", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_gizmos::light::LightGizmoColor": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoColor", + "oneOf": [ + { + "items": false, + "long_name": "Manual", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Manual", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Varied" + }, + { + "long_name": "MatchLightColor" + }, + { + "long_name": "ByLightType" + } + ], + "short_name": "LightGizmoColor", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_gizmos::light::LightGizmoConfigGroup": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoConfigGroup", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_gizmos::light::LightGizmoColor" + } + }, + "directional_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "draw_all": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "point_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "spot_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "required": [ + "draw_all", + "color", + "point_light_color", + "spot_light_color", + "directional_light_color" + ], + "short_name": "LightGizmoConfigGroup", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf::GltfExtras": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_gltf::GltfExtras", + "properties": { + "value": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "value" + ], + "short_name": "GltfExtras", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf::GltfMaterialExtras": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_gltf::GltfMaterialExtras", + "properties": { + "value": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "value" + ], + "short_name": "GltfMaterialExtras", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf::GltfMeshExtras": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_gltf::GltfMeshExtras", + "properties": { + "value": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "value" + ], + "short_name": "GltfMeshExtras", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gltf::GltfSceneExtras": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_gltf::GltfSceneExtras", + "properties": { + "value": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "value" + ], + "short_name": "GltfSceneExtras", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_hierarchy::components::children::Children": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_hierarchy::components::children::Children", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" + } + } + ], + "short_name": "Children", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_hierarchy::components::parent::Parent": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_hierarchy::components::parent::Parent", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + ], + "short_name": "Parent", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::ButtonState": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::ButtonState", + "oneOf": [ + "Pressed", + "Released" + ], + "short_name": "ButtonState", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::AxisSettings": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::AxisSettings", + "properties": { + "deadzone_lowerbound": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "deadzone_upperbound": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "livezone_lowerbound": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "livezone_upperbound": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "threshold": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "livezone_upperbound", + "deadzone_upperbound", + "deadzone_lowerbound", + "livezone_lowerbound", + "threshold" + ], + "short_name": "AxisSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::ButtonAxisSettings": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::ButtonAxisSettings", + "properties": { + "high": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "low": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "threshold": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "high", + "low", + "threshold" + ], + "short_name": "ButtonAxisSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::ButtonSettings": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::ButtonSettings", + "properties": { + "press_threshold": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "release_threshold": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "press_threshold", + "release_threshold" + ], + "short_name": "ButtonSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::Gamepad": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::Gamepad", + "properties": { + "id": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "id" + ], + "short_name": "Gamepad", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadAxis": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxis", + "properties": { + "axis_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + } + }, + "required": [ + "gamepad", + "axis_type" + ], + "short_name": "GamepadAxis", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadAxisChangedEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisChangedEvent", + "properties": { + "axis_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "gamepad", + "axis_type", + "value" + ], + "short_name": "GamepadAxisChangedEvent", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadAxisType": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisType", + "oneOf": [ + { + "long_name": "LeftStickX" + }, + { + "long_name": "LeftStickY" + }, + { + "long_name": "LeftZ" + }, + { + "long_name": "RightStickX" + }, + { + "long_name": "RightStickY" + }, + { + "long_name": "RightZ" + }, + { + "items": false, + "long_name": "Other", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u8" + } + } + ], + "short_name": "Other", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "GamepadAxisType", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::GamepadButton": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButton", + "properties": { + "button_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + } + }, + "required": [ + "gamepad", + "button_type" + ], + "short_name": "GamepadButton", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadButtonChangedEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonChangedEvent", + "properties": { + "button_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "gamepad", + "button_type", + "value" + ], + "short_name": "GamepadButtonChangedEvent", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadButtonInput": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonInput", + "properties": { + "button": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "state": { + "type": { + "$ref": "#/$defs/bevy_input::ButtonState" + } + } + }, + "required": [ + "button", + "state" + ], + "short_name": "GamepadButtonInput", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadButtonType": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonType", + "oneOf": [ + { + "long_name": "South" + }, + { + "long_name": "East" + }, + { + "long_name": "North" + }, + { + "long_name": "West" + }, + { + "long_name": "C" + }, + { + "long_name": "Z" + }, + { + "long_name": "LeftTrigger" + }, + { + "long_name": "LeftTrigger2" + }, + { + "long_name": "RightTrigger" + }, + { + "long_name": "RightTrigger2" + }, + { + "long_name": "Select" + }, + { + "long_name": "Start" + }, + { + "long_name": "Mode" + }, + { + "long_name": "LeftThumb" + }, + { + "long_name": "RightThumb" + }, + { + "long_name": "DPadUp" + }, + { + "long_name": "DPadDown" + }, + { + "long_name": "DPadLeft" + }, + { + "long_name": "DPadRight" + }, + { + "items": false, + "long_name": "Other", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u8" + } + } + ], + "short_name": "Other", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "GamepadButtonType", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::GamepadConnection": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnection", + "oneOf": [ + { + "items": false, + "long_name": "Connected", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadInfo" + } + } + ], + "short_name": "Connected", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Disconnected" + } + ], + "short_name": "GamepadConnection", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::GamepadConnectionEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnectionEvent", + "properties": { + "connection": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadConnection" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + } + }, + "required": [ + "gamepad", + "connection" + ], + "short_name": "GamepadConnectionEvent", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadEvent": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadEvent", + "oneOf": [ + { + "items": false, + "long_name": "Connection", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadConnectionEvent" + } + } + ], + "short_name": "Connection", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Button", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonChangedEvent" + } + } + ], + "short_name": "Button", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Axis", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisChangedEvent" + } + } + ], + "short_name": "Axis", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "GamepadEvent", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::GamepadInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name" + ], + "short_name": "GamepadInfo", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadSettings": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadSettings", + "properties": { + "axis_settings": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + }, + "button_axis_settings": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + }, + "button_settings": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + }, + "default_axis_settings": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::AxisSettings" + } + }, + "default_button_axis_settings": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonAxisSettings" + } + }, + "default_button_settings": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonSettings" + } + } + }, + "required": [ + "default_button_settings", + "default_axis_settings", + "default_button_axis_settings", + "button_settings", + "axis_settings", + "button_axis_settings" + ], + "short_name": "GamepadSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gestures::DoubleTapGesture": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gestures::DoubleTapGesture", + "properties": {}, + "required": [], + "short_name": "DoubleTapGesture", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gestures::PanGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::PanGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "PanGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::gestures::PinchGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::PinchGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "PinchGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::gestures::RotationGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::RotationGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "RotationGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::keyboard::Key": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::keyboard::Key", + "oneOf": [ + { + "items": false, + "long_name": "Character", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + } + ], + "short_name": "Character", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Unidentified", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::NativeKey" + } + } + ], + "short_name": "Unidentified", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Dead", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + ], + "short_name": "Dead", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Alt" + }, + { + "long_name": "AltGraph" + }, + { + "long_name": "CapsLock" + }, + { + "long_name": "Control" + }, + { + "long_name": "Fn" + }, + { + "long_name": "FnLock" + }, + { + "long_name": "NumLock" + }, + { + "long_name": "ScrollLock" + }, + { + "long_name": "Shift" + }, + { + "long_name": "Symbol" + }, + { + "long_name": "SymbolLock" + }, + { + "long_name": "Meta" + }, + { + "long_name": "Hyper" + }, + { + "long_name": "Super" + }, + { + "long_name": "Enter" + }, + { + "long_name": "Tab" + }, + { + "long_name": "Space" + }, + { + "long_name": "ArrowDown" + }, + { + "long_name": "ArrowLeft" + }, + { + "long_name": "ArrowRight" + }, + { + "long_name": "ArrowUp" + }, + { + "long_name": "End" + }, + { + "long_name": "Home" + }, + { + "long_name": "PageDown" + }, + { + "long_name": "PageUp" + }, + { + "long_name": "Backspace" + }, + { + "long_name": "Clear" + }, + { + "long_name": "Copy" + }, + { + "long_name": "CrSel" + }, + { + "long_name": "Cut" + }, + { + "long_name": "Delete" + }, + { + "long_name": "EraseEof" + }, + { + "long_name": "ExSel" + }, + { + "long_name": "Insert" + }, + { + "long_name": "Paste" + }, + { + "long_name": "Redo" + }, + { + "long_name": "Undo" + }, + { + "long_name": "Accept" + }, + { + "long_name": "Again" + }, + { + "long_name": "Attn" + }, + { + "long_name": "Cancel" + }, + { + "long_name": "ContextMenu" + }, + { + "long_name": "Escape" + }, + { + "long_name": "Execute" + }, + { + "long_name": "Find" + }, + { + "long_name": "Help" + }, + { + "long_name": "Pause" + }, + { + "long_name": "Play" + }, + { + "long_name": "Props" + }, + { + "long_name": "Select" + }, + { + "long_name": "ZoomIn" + }, + { + "long_name": "ZoomOut" + }, + { + "long_name": "BrightnessDown" + }, + { + "long_name": "BrightnessUp" + }, + { + "long_name": "Eject" + }, + { + "long_name": "LogOff" + }, + { + "long_name": "Power" + }, + { + "long_name": "PowerOff" + }, + { + "long_name": "PrintScreen" + }, + { + "long_name": "Hibernate" + }, + { + "long_name": "Standby" + }, + { + "long_name": "WakeUp" + }, + { + "long_name": "AllCandidates" + }, + { + "long_name": "Alphanumeric" + }, + { + "long_name": "CodeInput" + }, + { + "long_name": "Compose" + }, + { + "long_name": "Convert" + }, + { + "long_name": "FinalMode" + }, + { + "long_name": "GroupFirst" + }, + { + "long_name": "GroupLast" + }, + { + "long_name": "GroupNext" + }, + { + "long_name": "GroupPrevious" + }, + { + "long_name": "ModeChange" + }, + { + "long_name": "NextCandidate" + }, + { + "long_name": "NonConvert" + }, + { + "long_name": "PreviousCandidate" + }, + { + "long_name": "Process" + }, + { + "long_name": "SingleCandidate" + }, + { + "long_name": "HangulMode" + }, + { + "long_name": "HanjaMode" + }, + { + "long_name": "JunjaMode" + }, + { + "long_name": "Eisu" + }, + { + "long_name": "Hankaku" + }, + { + "long_name": "Hiragana" + }, + { + "long_name": "HiraganaKatakana" + }, + { + "long_name": "KanaMode" + }, + { + "long_name": "KanjiMode" + }, + { + "long_name": "Katakana" + }, + { + "long_name": "Romaji" + }, + { + "long_name": "Zenkaku" + }, + { + "long_name": "ZenkakuHankaku" + }, + { + "long_name": "Soft1" + }, + { + "long_name": "Soft2" + }, + { + "long_name": "Soft3" + }, + { + "long_name": "Soft4" + }, + { + "long_name": "ChannelDown" + }, + { + "long_name": "ChannelUp" + }, + { + "long_name": "Close" + }, + { + "long_name": "MailForward" + }, + { + "long_name": "MailReply" + }, + { + "long_name": "MailSend" + }, + { + "long_name": "MediaClose" + }, + { + "long_name": "MediaFastForward" + }, + { + "long_name": "MediaPause" + }, + { + "long_name": "MediaPlay" + }, + { + "long_name": "MediaPlayPause" + }, + { + "long_name": "MediaRecord" + }, + { + "long_name": "MediaRewind" + }, + { + "long_name": "MediaStop" + }, + { + "long_name": "MediaTrackNext" + }, + { + "long_name": "MediaTrackPrevious" + }, + { + "long_name": "New" + }, + { + "long_name": "Open" + }, + { + "long_name": "Print" + }, + { + "long_name": "Save" + }, + { + "long_name": "SpellCheck" + }, + { + "long_name": "Key11" + }, + { + "long_name": "Key12" + }, + { + "long_name": "AudioBalanceLeft" + }, + { + "long_name": "AudioBalanceRight" + }, + { + "long_name": "AudioBassBoostDown" + }, + { + "long_name": "AudioBassBoostToggle" + }, + { + "long_name": "AudioBassBoostUp" + }, + { + "long_name": "AudioFaderFront" + }, + { + "long_name": "AudioFaderRear" + }, + { + "long_name": "AudioSurroundModeNext" + }, + { + "long_name": "AudioTrebleDown" + }, + { + "long_name": "AudioTrebleUp" + }, + { + "long_name": "AudioVolumeDown" + }, + { + "long_name": "AudioVolumeUp" + }, + { + "long_name": "AudioVolumeMute" + }, + { + "long_name": "MicrophoneToggle" + }, + { + "long_name": "MicrophoneVolumeDown" + }, + { + "long_name": "MicrophoneVolumeUp" + }, + { + "long_name": "MicrophoneVolumeMute" + }, + { + "long_name": "SpeechCorrectionList" + }, + { + "long_name": "SpeechInputToggle" + }, + { + "long_name": "LaunchApplication1" + }, + { + "long_name": "LaunchApplication2" + }, + { + "long_name": "LaunchCalendar" + }, + { + "long_name": "LaunchContacts" + }, + { + "long_name": "LaunchMail" + }, + { + "long_name": "LaunchMediaPlayer" + }, + { + "long_name": "LaunchMusicPlayer" + }, + { + "long_name": "LaunchPhone" + }, + { + "long_name": "LaunchScreenSaver" + }, + { + "long_name": "LaunchSpreadsheet" + }, + { + "long_name": "LaunchWebBrowser" + }, + { + "long_name": "LaunchWebCam" + }, + { + "long_name": "LaunchWordProcessor" + }, + { + "long_name": "BrowserBack" + }, + { + "long_name": "BrowserFavorites" + }, + { + "long_name": "BrowserForward" + }, + { + "long_name": "BrowserHome" + }, + { + "long_name": "BrowserRefresh" + }, + { + "long_name": "BrowserSearch" + }, + { + "long_name": "BrowserStop" + }, + { + "long_name": "AppSwitch" + }, + { + "long_name": "Call" + }, + { + "long_name": "Camera" + }, + { + "long_name": "CameraFocus" + }, + { + "long_name": "EndCall" + }, + { + "long_name": "GoBack" + }, + { + "long_name": "GoHome" + }, + { + "long_name": "HeadsetHook" + }, + { + "long_name": "LastNumberRedial" + }, + { + "long_name": "Notification" + }, + { + "long_name": "MannerMode" + }, + { + "long_name": "VoiceDial" + }, + { + "long_name": "TV" + }, + { + "long_name": "TV3DMode" + }, + { + "long_name": "TVAntennaCable" + }, + { + "long_name": "TVAudioDescription" + }, + { + "long_name": "TVAudioDescriptionMixDown" + }, + { + "long_name": "TVAudioDescriptionMixUp" + }, + { + "long_name": "TVContentsMenu" + }, + { + "long_name": "TVDataService" + }, + { + "long_name": "TVInput" + }, + { + "long_name": "TVInputComponent1" + }, + { + "long_name": "TVInputComponent2" + }, + { + "long_name": "TVInputComposite1" + }, + { + "long_name": "TVInputComposite2" + }, + { + "long_name": "TVInputHDMI1" + }, + { + "long_name": "TVInputHDMI2" + }, + { + "long_name": "TVInputHDMI3" + }, + { + "long_name": "TVInputHDMI4" + }, + { + "long_name": "TVInputVGA1" + }, + { + "long_name": "TVMediaContext" + }, + { + "long_name": "TVNetwork" + }, + { + "long_name": "TVNumberEntry" + }, + { + "long_name": "TVPower" + }, + { + "long_name": "TVRadioService" + }, + { + "long_name": "TVSatellite" + }, + { + "long_name": "TVSatelliteBS" + }, + { + "long_name": "TVSatelliteCS" + }, + { + "long_name": "TVSatelliteToggle" + }, + { + "long_name": "TVTerrestrialAnalog" + }, + { + "long_name": "TVTerrestrialDigital" + }, + { + "long_name": "TVTimer" + }, + { + "long_name": "AVRInput" + }, + { + "long_name": "AVRPower" + }, + { + "long_name": "ColorF0Red" + }, + { + "long_name": "ColorF1Green" + }, + { + "long_name": "ColorF2Yellow" + }, + { + "long_name": "ColorF3Blue" + }, + { + "long_name": "ColorF4Grey" + }, + { + "long_name": "ColorF5Brown" + }, + { + "long_name": "ClosedCaptionToggle" + }, + { + "long_name": "Dimmer" + }, + { + "long_name": "DisplaySwap" + }, + { + "long_name": "DVR" + }, + { + "long_name": "Exit" + }, + { + "long_name": "FavoriteClear0" + }, + { + "long_name": "FavoriteClear1" + }, + { + "long_name": "FavoriteClear2" + }, + { + "long_name": "FavoriteClear3" + }, + { + "long_name": "FavoriteRecall0" + }, + { + "long_name": "FavoriteRecall1" + }, + { + "long_name": "FavoriteRecall2" + }, + { + "long_name": "FavoriteRecall3" + }, + { + "long_name": "FavoriteStore0" + }, + { + "long_name": "FavoriteStore1" + }, + { + "long_name": "FavoriteStore2" + }, + { + "long_name": "FavoriteStore3" + }, + { + "long_name": "Guide" + }, + { + "long_name": "GuideNextDay" + }, + { + "long_name": "GuidePreviousDay" + }, + { + "long_name": "Info" + }, + { + "long_name": "InstantReplay" + }, + { + "long_name": "Link" + }, + { + "long_name": "ListProgram" + }, + { + "long_name": "LiveContent" + }, + { + "long_name": "Lock" + }, + { + "long_name": "MediaApps" + }, + { + "long_name": "MediaAudioTrack" + }, + { + "long_name": "MediaLast" + }, + { + "long_name": "MediaSkipBackward" + }, + { + "long_name": "MediaSkipForward" + }, + { + "long_name": "MediaStepBackward" + }, + { + "long_name": "MediaStepForward" + }, + { + "long_name": "MediaTopMenu" + }, + { + "long_name": "NavigateIn" + }, + { + "long_name": "NavigateNext" + }, + { + "long_name": "NavigateOut" + }, + { + "long_name": "NavigatePrevious" + }, + { + "long_name": "NextFavoriteChannel" + }, + { + "long_name": "NextUserProfile" + }, + { + "long_name": "OnDemand" + }, + { + "long_name": "Pairing" + }, + { + "long_name": "PinPDown" + }, + { + "long_name": "PinPMove" + }, + { + "long_name": "PinPToggle" + }, + { + "long_name": "PinPUp" + }, + { + "long_name": "PlaySpeedDown" + }, + { + "long_name": "PlaySpeedReset" + }, + { + "long_name": "PlaySpeedUp" + }, + { + "long_name": "RandomToggle" + }, + { + "long_name": "RcLowBattery" + }, + { + "long_name": "RecordSpeedNext" + }, + { + "long_name": "RfBypass" + }, + { + "long_name": "ScanChannelsToggle" + }, + { + "long_name": "ScreenModeNext" + }, + { + "long_name": "Settings" + }, + { + "long_name": "SplitScreenToggle" + }, + { + "long_name": "STBInput" + }, + { + "long_name": "STBPower" + }, + { + "long_name": "Subtitle" + }, + { + "long_name": "Teletext" + }, + { + "long_name": "VideoModeNext" + }, + { + "long_name": "Wink" + }, + { + "long_name": "ZoomToggle" + }, + { + "long_name": "F1" + }, + { + "long_name": "F2" + }, + { + "long_name": "F3" + }, + { + "long_name": "F4" + }, + { + "long_name": "F5" + }, + { + "long_name": "F6" + }, + { + "long_name": "F7" + }, + { + "long_name": "F8" + }, + { + "long_name": "F9" + }, + { + "long_name": "F10" + }, + { + "long_name": "F11" + }, + { + "long_name": "F12" + }, + { + "long_name": "F13" + }, + { + "long_name": "F14" + }, + { + "long_name": "F15" + }, + { + "long_name": "F16" + }, + { + "long_name": "F17" + }, + { + "long_name": "F18" + }, + { + "long_name": "F19" + }, + { + "long_name": "F20" + }, + { + "long_name": "F21" + }, + { + "long_name": "F22" + }, + { + "long_name": "F23" + }, + { + "long_name": "F24" + }, + { + "long_name": "F25" + }, + { + "long_name": "F26" + }, + { + "long_name": "F27" + }, + { + "long_name": "F28" + }, + { + "long_name": "F29" + }, + { + "long_name": "F30" + }, + { + "long_name": "F31" + }, + { + "long_name": "F32" + }, + { + "long_name": "F33" + }, + { + "long_name": "F34" + }, + { + "long_name": "F35" + } + ], + "short_name": "Key", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::keyboard::KeyCode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::keyboard::KeyCode", + "oneOf": [ + { + "items": false, + "long_name": "Unidentified", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::NativeKeyCode" + } + } + ], + "short_name": "Unidentified", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Backquote" + }, + { + "long_name": "Backslash" + }, + { + "long_name": "BracketLeft" + }, + { + "long_name": "BracketRight" + }, + { + "long_name": "Comma" + }, + { + "long_name": "Digit0" + }, + { + "long_name": "Digit1" + }, + { + "long_name": "Digit2" + }, + { + "long_name": "Digit3" + }, + { + "long_name": "Digit4" + }, + { + "long_name": "Digit5" + }, + { + "long_name": "Digit6" + }, + { + "long_name": "Digit7" + }, + { + "long_name": "Digit8" + }, + { + "long_name": "Digit9" + }, + { + "long_name": "Equal" + }, + { + "long_name": "IntlBackslash" + }, + { + "long_name": "IntlRo" + }, + { + "long_name": "IntlYen" + }, + { + "long_name": "KeyA" + }, + { + "long_name": "KeyB" + }, + { + "long_name": "KeyC" + }, + { + "long_name": "KeyD" + }, + { + "long_name": "KeyE" + }, + { + "long_name": "KeyF" + }, + { + "long_name": "KeyG" + }, + { + "long_name": "KeyH" + }, + { + "long_name": "KeyI" + }, + { + "long_name": "KeyJ" + }, + { + "long_name": "KeyK" + }, + { + "long_name": "KeyL" + }, + { + "long_name": "KeyM" + }, + { + "long_name": "KeyN" + }, + { + "long_name": "KeyO" + }, + { + "long_name": "KeyP" + }, + { + "long_name": "KeyQ" + }, + { + "long_name": "KeyR" + }, + { + "long_name": "KeyS" + }, + { + "long_name": "KeyT" + }, + { + "long_name": "KeyU" + }, + { + "long_name": "KeyV" + }, + { + "long_name": "KeyW" + }, + { + "long_name": "KeyX" + }, + { + "long_name": "KeyY" + }, + { + "long_name": "KeyZ" + }, + { + "long_name": "Minus" + }, + { + "long_name": "Period" + }, + { + "long_name": "Quote" + }, + { + "long_name": "Semicolon" + }, + { + "long_name": "Slash" + }, + { + "long_name": "AltLeft" + }, + { + "long_name": "AltRight" + }, + { + "long_name": "Backspace" + }, + { + "long_name": "CapsLock" + }, + { + "long_name": "ContextMenu" + }, + { + "long_name": "ControlLeft" + }, + { + "long_name": "ControlRight" + }, + { + "long_name": "Enter" + }, + { + "long_name": "SuperLeft" + }, + { + "long_name": "SuperRight" + }, + { + "long_name": "ShiftLeft" + }, + { + "long_name": "ShiftRight" + }, + { + "long_name": "Space" + }, + { + "long_name": "Tab" + }, + { + "long_name": "Convert" + }, + { + "long_name": "KanaMode" + }, + { + "long_name": "Lang1" + }, + { + "long_name": "Lang2" + }, + { + "long_name": "Lang3" + }, + { + "long_name": "Lang4" + }, + { + "long_name": "Lang5" + }, + { + "long_name": "NonConvert" + }, + { + "long_name": "Delete" + }, + { + "long_name": "End" + }, + { + "long_name": "Help" + }, + { + "long_name": "Home" + }, + { + "long_name": "Insert" + }, + { + "long_name": "PageDown" + }, + { + "long_name": "PageUp" + }, + { + "long_name": "ArrowDown" + }, + { + "long_name": "ArrowLeft" + }, + { + "long_name": "ArrowRight" + }, + { + "long_name": "ArrowUp" + }, + { + "long_name": "NumLock" + }, + { + "long_name": "Numpad0" + }, + { + "long_name": "Numpad1" + }, + { + "long_name": "Numpad2" + }, + { + "long_name": "Numpad3" + }, + { + "long_name": "Numpad4" + }, + { + "long_name": "Numpad5" + }, + { + "long_name": "Numpad6" + }, + { + "long_name": "Numpad7" + }, + { + "long_name": "Numpad8" + }, + { + "long_name": "Numpad9" + }, + { + "long_name": "NumpadAdd" + }, + { + "long_name": "NumpadBackspace" + }, + { + "long_name": "NumpadClear" + }, + { + "long_name": "NumpadClearEntry" + }, + { + "long_name": "NumpadComma" + }, + { + "long_name": "NumpadDecimal" + }, + { + "long_name": "NumpadDivide" + }, + { + "long_name": "NumpadEnter" + }, + { + "long_name": "NumpadEqual" + }, + { + "long_name": "NumpadHash" + }, + { + "long_name": "NumpadMemoryAdd" + }, + { + "long_name": "NumpadMemoryClear" + }, + { + "long_name": "NumpadMemoryRecall" + }, + { + "long_name": "NumpadMemoryStore" + }, + { + "long_name": "NumpadMemorySubtract" + }, + { + "long_name": "NumpadMultiply" + }, + { + "long_name": "NumpadParenLeft" + }, + { + "long_name": "NumpadParenRight" + }, + { + "long_name": "NumpadStar" + }, + { + "long_name": "NumpadSubtract" + }, + { + "long_name": "Escape" + }, + { + "long_name": "Fn" + }, + { + "long_name": "FnLock" + }, + { + "long_name": "PrintScreen" + }, + { + "long_name": "ScrollLock" + }, + { + "long_name": "Pause" + }, + { + "long_name": "BrowserBack" + }, + { + "long_name": "BrowserFavorites" + }, + { + "long_name": "BrowserForward" + }, + { + "long_name": "BrowserHome" + }, + { + "long_name": "BrowserRefresh" + }, + { + "long_name": "BrowserSearch" + }, + { + "long_name": "BrowserStop" + }, + { + "long_name": "Eject" + }, + { + "long_name": "LaunchApp1" + }, + { + "long_name": "LaunchApp2" + }, + { + "long_name": "LaunchMail" + }, + { + "long_name": "MediaPlayPause" + }, + { + "long_name": "MediaSelect" + }, + { + "long_name": "MediaStop" + }, + { + "long_name": "MediaTrackNext" + }, + { + "long_name": "MediaTrackPrevious" + }, + { + "long_name": "Power" + }, + { + "long_name": "Sleep" + }, + { + "long_name": "AudioVolumeDown" + }, + { + "long_name": "AudioVolumeMute" + }, + { + "long_name": "AudioVolumeUp" + }, + { + "long_name": "WakeUp" + }, + { + "long_name": "Meta" + }, + { + "long_name": "Hyper" + }, + { + "long_name": "Turbo" + }, + { + "long_name": "Abort" + }, + { + "long_name": "Resume" + }, + { + "long_name": "Suspend" + }, + { + "long_name": "Again" + }, + { + "long_name": "Copy" + }, + { + "long_name": "Cut" + }, + { + "long_name": "Find" + }, + { + "long_name": "Open" + }, + { + "long_name": "Paste" + }, + { + "long_name": "Props" + }, + { + "long_name": "Select" + }, + { + "long_name": "Undo" + }, + { + "long_name": "Hiragana" + }, + { + "long_name": "Katakana" + }, + { + "long_name": "F1" + }, + { + "long_name": "F2" + }, + { + "long_name": "F3" + }, + { + "long_name": "F4" + }, + { + "long_name": "F5" + }, + { + "long_name": "F6" + }, + { + "long_name": "F7" + }, + { + "long_name": "F8" + }, + { + "long_name": "F9" + }, + { + "long_name": "F10" + }, + { + "long_name": "F11" + }, + { + "long_name": "F12" + }, + { + "long_name": "F13" + }, + { + "long_name": "F14" + }, + { + "long_name": "F15" + }, + { + "long_name": "F16" + }, + { + "long_name": "F17" + }, + { + "long_name": "F18" + }, + { + "long_name": "F19" + }, + { + "long_name": "F20" + }, + { + "long_name": "F21" + }, + { + "long_name": "F22" + }, + { + "long_name": "F23" + }, + { + "long_name": "F24" + }, + { + "long_name": "F25" + }, + { + "long_name": "F26" + }, + { + "long_name": "F27" + }, + { + "long_name": "F28" + }, + { + "long_name": "F29" + }, + { + "long_name": "F30" + }, + { + "long_name": "F31" + }, + { + "long_name": "F32" + }, + { + "long_name": "F33" + }, + { + "long_name": "F34" + }, + { + "long_name": "F35" + } + ], + "short_name": "KeyCode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::keyboard::KeyboardInput": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::keyboard::KeyboardInput", + "properties": { + "key_code": { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::KeyCode" + } + }, + "logical_key": { + "type": { + "$ref": "#/$defs/bevy_input::keyboard::Key" + } + }, + "state": { + "type": { + "$ref": "#/$defs/bevy_input::ButtonState" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "key_code", + "logical_key", + "state", + "window" + ], + "short_name": "KeyboardInput", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::keyboard::NativeKey": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::keyboard::NativeKey", + "oneOf": [ + { + "long_name": "Unidentified" + }, + { + "items": false, + "long_name": "Android", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Android", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "MacOS", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "MacOS", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Windows", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Windows", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Xkb", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Xkb", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Web", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + } + ], + "short_name": "Web", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "NativeKey", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::keyboard::NativeKeyCode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::keyboard::NativeKeyCode", + "oneOf": [ + { + "long_name": "Unidentified" + }, + { + "items": false, + "long_name": "Android", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Android", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "MacOS", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "MacOS", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Windows", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Windows", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Xkb", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Xkb", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "NativeKeyCode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::mouse::MouseButton": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::mouse::MouseButton", + "oneOf": [ + { + "long_name": "Left" + }, + { + "long_name": "Right" + }, + { + "long_name": "Middle" + }, + { + "long_name": "Back" + }, + { + "long_name": "Forward" + }, + { + "items": false, + "long_name": "Other", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Other", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "MouseButton", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::mouse::MouseButtonInput": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::mouse::MouseButtonInput", + "properties": { + "button": { + "type": { + "$ref": "#/$defs/bevy_input::mouse::MouseButton" + } + }, + "state": { + "type": { + "$ref": "#/$defs/bevy_input::ButtonState" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "button", + "state", + "window" + ], + "short_name": "MouseButtonInput", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::touch::ForceTouch": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::touch::ForceTouch", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Calibrated", + "properties": { + "altitude_angle": { + "long_name": "altitude_angle", + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "force": { + "long_name": "force", + "type": { + "$ref": "#/$defs/f64" + } + }, + "max_possible_force": { + "long_name": "max_possible_force", + "type": { + "$ref": "#/$defs/f64" + } + } + }, + "required": [ + "force", + "max_possible_force" + ], + "short_name": "Calibrated", + "type": "object", + "typeInfo": "Struct" + }, + { + "items": false, + "long_name": "Normalized", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f64" + } + } + ], + "short_name": "Normalized", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "ForceTouch", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::touch::TouchInput": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::touch::TouchInput", + "properties": { + "force": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "id": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "phase": { + "type": { + "$ref": "#/$defs/bevy_input::touch::TouchPhase" + } + }, + "position": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "phase", + "position", + "window", + "id" + ], + "short_name": "TouchInput", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::touch::TouchPhase": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::touch::TouchPhase", + "oneOf": [ + "Started", + "Moved", + "Ended", + "Canceled" + ], + "short_name": "TouchPhase", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_math::rects::rect::Rect": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_math::rects::rect::Rect", + "properties": { + "max": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "min": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "min", + "max" + ], + "short_name": "Rect", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_math::rects::urect::URect": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_math::rects::urect::URect", + "properties": { + "max": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } + }, + "min": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } + } + }, + "required": [ + "min", + "max" + ], + "short_name": "URect", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::bundle::CascadesVisibleEntities": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::bundle::CascadesVisibleEntities", + "properties": {}, + "required": [], + "short_name": "CascadesVisibleEntities", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::bundle::CubemapVisibleEntities": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::bundle::CubemapVisibleEntities", + "properties": {}, + "required": [], + "short_name": "CubemapVisibleEntities", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::cluster::ClusterConfig": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterConfig", + "oneOf": [ + { + "long_name": "None" + }, + { + "long_name": "Single" + }, + { + "additionalProperties": false, + "long_name": "XYZ", + "properties": { + "dimensions": { + "long_name": "dimensions", + "type": { + "$ref": "#/$defs/glam::UVec3" + } + }, + "dynamic_resizing": { + "long_name": "dynamic_resizing", + "type": { + "$ref": "#/$defs/bool" + } + }, + "z_config": { + "long_name": "z_config", + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" + } + } + }, + "required": [ + "dimensions", + "z_config", + "dynamic_resizing" + ], + "short_name": "XYZ", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "FixedZ", + "properties": { + "dynamic_resizing": { + "long_name": "dynamic_resizing", + "type": { + "$ref": "#/$defs/bool" + } + }, + "total": { + "long_name": "total", + "type": { + "$ref": "#/$defs/u32" + } + }, + "z_config": { + "long_name": "z_config", + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" + } + }, + "z_slices": { + "long_name": "z_slices", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "total", + "z_slices", + "z_config", + "dynamic_resizing" + ], + "short_name": "FixedZ", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ClusterConfig", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::cluster::ClusterFarZMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterFarZMode", + "oneOf": [ + { + "long_name": "MaxClusterableObjectRange" + }, + { + "items": false, + "long_name": "Constant", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Constant", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "ClusterFarZMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::cluster::ClusterZConfig": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterZConfig", + "properties": { + "far_z_mode": { + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterFarZMode" + } + }, + "first_slice_depth": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "first_slice_depth", + "far_z_mode" + ], + "short_name": "ClusterZConfig", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::fog::FogFalloff": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::fog::FogFalloff", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Linear", + "properties": { + "end": { + "long_name": "end", + "type": { + "$ref": "#/$defs/f32" + } + }, + "start": { + "long_name": "start", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "start", + "end" + ], + "short_name": "Linear", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Exponential", + "properties": { + "density": { + "long_name": "density", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "density" + ], + "short_name": "Exponential", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "ExponentialSquared", + "properties": { + "density": { + "long_name": "density", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "density" + ], + "short_name": "ExponentialSquared", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Atmospheric", + "properties": { + "extinction": { + "long_name": "extinction", + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "inscattering": { + "long_name": "inscattering", + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "extinction", + "inscattering" + ], + "short_name": "Atmospheric", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "FogFalloff", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::fog::FogSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::fog::FogSettings", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "directional_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "directional_light_exponent": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "falloff": { + "type": { + "$ref": "#/$defs/bevy_pbr::fog::FogFalloff" + } + } + }, + "required": [ + "color", + "directional_light_color", + "directional_light_exponent", + "falloff" + ], + "short_name": "FogSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::Cascade": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::light::Cascade", + "properties": { + "clip_from_cascade": { + "type": { + "$ref": "#/$defs/glam::Mat4" + } + }, + "clip_from_world": { + "type": { + "$ref": "#/$defs/glam::Mat4" + } + }, + "texel_size": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "world_from_cascade": { + "type": { + "$ref": "#/$defs/glam::Mat4" + } + } + }, + "required": [ + "world_from_cascade", + "clip_from_cascade", + "clip_from_world", + "texel_size" + ], + "short_name": "Cascade", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::CascadeShadowConfig": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::CascadeShadowConfig", + "properties": { + "bounds": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "minimum_distance": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "overlap_proportion": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "bounds", + "overlap_proportion", + "minimum_distance" + ], + "short_name": "CascadeShadowConfig", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::Cascades": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::Cascades", + "properties": { + "cascades": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>" + } + } + }, + "required": [ + "cascades" + ], + "short_name": "Cascades", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::DirectionalLightShadowMap": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::DirectionalLightShadowMap", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "size" + ], + "short_name": "DirectionalLightShadowMap", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::NotShadowCaster": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::NotShadowCaster", + "properties": {}, + "required": [], + "short_name": "NotShadowCaster", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::NotShadowReceiver": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::NotShadowReceiver", + "properties": {}, + "required": [], + "short_name": "NotShadowReceiver", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::PointLightShadowMap": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::PointLightShadowMap", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "size" + ], + "short_name": "PointLightShadowMap", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::ShadowFilteringMethod": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::ShadowFilteringMethod", + "oneOf": [ + "Hardware2x2", + "Gaussian", + "Temporal" + ], + "short_name": "ShadowFilteringMethod", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::light::ambient_light::AmbientLight": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::ambient_light::AmbientLight", + "properties": { + "brightness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "required": [ + "color", + "brightness" + ], + "short_name": "AmbientLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::directional_light::DirectionalLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::directional_light::DirectionalLight", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "illuminance": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_normal_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadows_enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "color", + "illuminance", + "shadows_enabled", + "shadow_depth_bias", + "shadow_normal_bias" + ], + "short_name": "DirectionalLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::point_light::PointLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::point_light::PointLight", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "radius": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "range": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_normal_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadows_enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "color", + "intensity", + "range", + "radius", + "shadows_enabled", + "shadow_depth_bias", + "shadow_normal_bias" + ], + "short_name": "PointLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::spot_light::SpotLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::spot_light::SpotLight", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "inner_angle": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "outer_angle": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "radius": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "range": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadow_normal_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "shadows_enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "color", + "intensity", + "range", + "radius", + "shadows_enabled", + "shadow_depth_bias", + "shadow_normal_bias", + "outer_angle", + "inner_angle" + ], + "short_name": "SpotLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::LightProbe": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light_probe::LightProbe", + "properties": {}, + "required": [], + "short_name": "LightProbe", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::environment_map::EnvironmentMapLight": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", + "properties": { + "diffuse_map": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "specular_map": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "diffuse_map", + "specular_map", + "intensity" + ], + "short_name": "EnvironmentMapLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", + "properties": { + "intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "voxels": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "voxels", + "intensity" + ], + "short_name": "IrradianceVolume", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::material::DefaultOpaqueRendererMethod": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_pbr::material::DefaultOpaqueRendererMethod", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_pbr::material::OpaqueRendererMethod" + } + } + ], + "short_name": "DefaultOpaqueRendererMethod", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_pbr::material::OpaqueRendererMethod": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::material::OpaqueRendererMethod", + "oneOf": [ + "Forward", + "Deferred", + "Auto" + ], + "short_name": "OpaqueRendererMethod", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::parallax::ParallaxMappingMethod": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::parallax::ParallaxMappingMethod", + "oneOf": [ + { + "long_name": "Occlusion" + }, + { + "additionalProperties": false, + "long_name": "Relief", + "properties": { + "max_steps": { + "long_name": "max_steps", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "max_steps" + ], + "short_name": "Relief", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ParallaxMappingMethod", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::pbr_material::StandardMaterial": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::pbr_material::StandardMaterial", + "properties": { + "alpha_mode": { + "type": { + "$ref": "#/$defs/bevy_render::alpha::AlphaMode" + } + }, + "anisotropy_rotation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "anisotropy_strength": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "attenuation_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "attenuation_distance": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "base_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "base_color_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "base_color_texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "clearcoat": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "clearcoat_perceptual_roughness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "deferred_lighting_pass_id": { + "type": { + "$ref": "#/$defs/u8" + } + }, + "depth_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "depth_map": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "diffuse_transmission": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "double_sided": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "emissive": { + "type": { + "$ref": "#/$defs/bevy_color::linear_rgba::LinearRgba" + } + }, + "emissive_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "emissive_exposure_weight": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "emissive_texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "flip_normal_map_y": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "fog_enabled": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "ior": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightmap_exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "max_parallax_layer_count": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "metallic": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "metallic_roughness_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "metallic_roughness_texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "normal_map_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "normal_map_texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "occlusion_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "occlusion_texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "opaque_render_method": { + "type": { + "$ref": "#/$defs/bevy_pbr::material::OpaqueRendererMethod" + } + }, + "parallax_depth_scale": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "parallax_mapping_method": { + "type": { + "$ref": "#/$defs/bevy_pbr::parallax::ParallaxMappingMethod" + } + }, + "perceptual_roughness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "reflectance": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "specular_transmission": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "thickness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "unlit": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "uv_transform": { + "type": { + "$ref": "#/$defs/glam::Affine2" + } + } + }, + "required": [ + "base_color", + "base_color_channel", + "emissive", + "emissive_exposure_weight", + "emissive_channel", + "perceptual_roughness", + "metallic", + "metallic_roughness_channel", + "reflectance", + "diffuse_transmission", + "specular_transmission", + "thickness", + "ior", + "attenuation_distance", + "attenuation_color", + "normal_map_channel", + "flip_normal_map_y", + "occlusion_channel", + "clearcoat", + "clearcoat_perceptual_roughness", + "anisotropy_strength", + "anisotropy_rotation", + "double_sided", + "unlit", + "fog_enabled", + "alpha_mode", + "depth_bias", + "parallax_depth_scale", + "parallax_mapping_method", + "max_parallax_layer_count", + "lightmap_exposure", + "opaque_render_method", + "deferred_lighting_pass_id", + "uv_transform" + ], + "short_name": "StandardMaterial", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::pbr_material::UvChannel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::pbr_material::UvChannel", + "oneOf": [ + "Uv0", + "Uv1" + ], + "short_name": "UvChannel", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel", + "oneOf": [ + { + "long_name": "Low" + }, + { + "long_name": "Medium" + }, + { + "long_name": "High" + }, + { + "long_name": "Ultra" + }, + { + "additionalProperties": false, + "long_name": "Custom", + "properties": { + "samples_per_slice_side": { + "long_name": "samples_per_slice_side", + "type": { + "$ref": "#/$defs/u32" + } + }, + "slice_count": { + "long_name": "slice_count", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "slice_count", + "samples_per_slice_side" + ], + "short_name": "Custom", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ScreenSpaceAmbientOcclusionQualityLevel", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings", + "properties": { + "quality_level": { + "type": { + "$ref": "#/$defs/bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel" + } + } + }, + "required": [ + "quality_level" + ], + "short_name": "ScreenSpaceAmbientOcclusionSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::ssr::ScreenSpaceReflectionsSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::ssr::ScreenSpaceReflectionsSettings", + "properties": { + "bisection_steps": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "linear_march_exponent": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "linear_steps": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "perceptual_roughness_threshold": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "thickness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "use_secant": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "perceptual_roughness_threshold", + "thickness", + "linear_steps", + "linear_march_exponent", + "bisection_steps", + "use_secant" + ], + "short_name": "ScreenSpaceReflectionsSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::volumetric_fog::VolumetricFogSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricFogSettings", + "properties": { + "absorption": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "ambient_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "ambient_intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "density": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "fog_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "light_intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "light_tint": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "max_depth": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scattering": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scattering_asymmetry": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "step_count": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "fog_color", + "ambient_color", + "ambient_intensity", + "step_count", + "max_depth", + "absorption", + "scattering", + "density", + "scattering_asymmetry", + "light_tint", + "light_intensity" + ], + "short_name": "VolumetricFogSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::volumetric_fog::VolumetricLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricLight", + "properties": {}, + "required": [], + "short_name": "VolumetricLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::alpha::AlphaMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::alpha::AlphaMode", + "oneOf": [ + { + "long_name": "Opaque" + }, + { + "items": false, + "long_name": "Mask", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Mask", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Blend" + }, + { + "long_name": "Premultiplied" + }, + { + "long_name": "AlphaToCoverage" + }, + { + "long_name": "Add" + }, + { + "long_name": "Multiply" + } + ], + "short_name": "AlphaMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_render::camera::camera::Camera": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::Camera", + "properties": { + "clear_color": { + "type": { + "$ref": "#/$defs/bevy_render::camera::clear_color::ClearColorConfig" + } + }, + "hdr": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "is_active": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "msaa_writeback": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "order": { + "type": { + "$ref": "#/$defs/isize" + } + }, + "viewport": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + }, + "required": [ + "order", + "is_active", + "hdr", + "msaa_writeback", + "clear_color" + ], + "short_name": "Camera", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::camera::camera::CameraMainTextureUsages": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::CameraMainTextureUsages", + "short_name": "CameraMainTextureUsages", + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::camera::camera::CameraRenderGraph": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::CameraRenderGraph", + "short_name": "CameraRenderGraph", + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::camera::camera::Exposure": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::Exposure", + "short_name": "Exposure", + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::camera::camera::MipBias": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_render::camera::camera::MipBias", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "MipBias", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::camera::camera::TemporalJitter": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::TemporalJitter", + "properties": { + "offset": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "offset" + ], + "short_name": "TemporalJitter", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::camera::camera::Viewport": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::camera::camera::Viewport", + "properties": { + "depth": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "physical_position": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } + }, + "physical_size": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } + } + }, + "required": [ + "physical_position", + "physical_size", + "depth" + ], + "short_name": "Viewport", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::camera::clear_color::ClearColor": { + "isComponent": false, + "isResource": true, + "items": false, + "long_name": "bevy_render::camera::clear_color::ClearColor", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "ClearColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::camera::clear_color::ClearColorConfig": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::camera::clear_color::ClearColorConfig", + "oneOf": [ + { + "long_name": "Default" + }, + { + "items": false, + "long_name": "Custom", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Custom", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "None" + } + ], + "short_name": "ClearColorConfig", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_render::camera::projection::OrthographicProjection": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::projection::OrthographicProjection", + "properties": { + "area": { + "type": { + "$ref": "#/$defs/bevy_math::rects::rect::Rect" + } + }, + "far": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "near": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scale": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scaling_mode": { + "type": { + "$ref": "#/$defs/bevy_render::camera::projection::ScalingMode" + } + }, + "viewport_origin": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "near", + "far", + "viewport_origin", + "scaling_mode", + "scale", + "area" + ], + "short_name": "OrthographicProjection", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::camera::projection::PerspectiveProjection": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::projection::PerspectiveProjection", + "properties": { + "aspect_ratio": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "far": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "fov": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "near": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "fov", + "aspect_ratio", + "near", + "far" + ], + "short_name": "PerspectiveProjection", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::camera::projection::Projection": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::projection::Projection", + "oneOf": [ + { + "items": false, + "long_name": "Perspective", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::camera::projection::PerspectiveProjection" + } + } + ], + "short_name": "Perspective", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Orthographic", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::camera::projection::OrthographicProjection" + } + } + ], + "short_name": "Orthographic", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Projection", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_render::camera::projection::ScalingMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::camera::projection::ScalingMode", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Fixed", + "properties": { + "height": { + "long_name": "height", + "type": { + "$ref": "#/$defs/f32" + } + }, + "width": { + "long_name": "width", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "width", + "height" + ], + "short_name": "Fixed", + "type": "object", + "typeInfo": "Struct" + }, + { + "items": false, + "long_name": "WindowSize", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "WindowSize", + "type": "array", + "typeInfo": "Tuple" + }, + { + "additionalProperties": false, + "long_name": "AutoMin", + "properties": { + "min_height": { + "long_name": "min_height", + "type": { + "$ref": "#/$defs/f32" + } + }, + "min_width": { + "long_name": "min_width", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "min_width", + "min_height" + ], + "short_name": "AutoMin", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "AutoMax", + "properties": { + "max_height": { + "long_name": "max_height", + "type": { + "$ref": "#/$defs/f32" + } + }, + "max_width": { + "long_name": "max_width", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "max_width", + "max_height" + ], + "short_name": "AutoMax", + "type": "object", + "typeInfo": "Struct" + }, + { + "items": false, + "long_name": "FixedVertical", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "FixedVertical", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "FixedHorizontal", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "FixedHorizontal", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "ScalingMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_render::globals::GlobalsUniform": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_render::globals::GlobalsUniform", + "properties": { + "delta_time": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_count": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "time": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "time", + "delta_time", + "frame_count" + ], + "short_name": "GlobalsUniform", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::mesh::mesh::Indices": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::mesh::mesh::Indices", + "oneOf": [ + { + "items": false, + "long_name": "U16", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "U16", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "U32", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "U32", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Indices", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_render::mesh::mesh::Mesh": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::mesh::mesh::Mesh", + "properties": { + "asset_usage": { + "type": { + "$ref": "#/$defs/bevy_render::render_asset::RenderAssetUsages" + } + }, + "indices": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "morph_target_names": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "morph_targets": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + } + }, + "required": [ + "asset_usage" + ], + "short_name": "Mesh", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::mesh::mesh::skinning::SkinnedMesh": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::mesh::mesh::skinning::SkinnedMesh", + "properties": { + "inverse_bindposes": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "joints": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "inverse_bindposes", + "joints" + ], + "short_name": "SkinnedMesh", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::mesh::morph::MeshMorphWeights": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::mesh::morph::MeshMorphWeights", + "properties": { + "weights": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "weights" + ], + "short_name": "MeshMorphWeights", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::mesh::morph::MorphWeights": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::mesh::morph::MorphWeights", + "properties": { + "first_mesh": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + }, + "weights": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "weights" + ], + "short_name": "MorphWeights", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::primitives::Aabb": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::primitives::Aabb", + "properties": { + "center": { + "type": { + "$ref": "#/$defs/glam::Vec3A" + } + }, + "half_extents": { + "type": { + "$ref": "#/$defs/glam::Vec3A" + } + } + }, + "required": [ + "center", + "half_extents" + ], + "short_name": "Aabb", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::primitives::CascadesFrusta": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::primitives::CascadesFrusta", + "properties": {}, + "required": [], + "short_name": "CascadesFrusta", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::primitives::CubemapFrusta": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::primitives::CubemapFrusta", + "properties": {}, + "required": [], + "short_name": "CubemapFrusta", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::primitives::Frustum": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::primitives::Frustum", + "properties": {}, + "required": [], + "short_name": "Frustum", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::render_asset::RenderAssetUsages": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::render_asset::RenderAssetUsages", + "short_name": "RenderAssetUsages", + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::texture::image::Image": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::texture::image::Image", + "short_name": "Image", + "type": "object", + "typeInfo": "Value" + }, + "bevy_render::view::ColorGrading": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::view::ColorGrading", + "properties": { + "global": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingGlobal" + } + }, + "highlights": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + }, + "midtones": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + }, + "shadows": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + } + }, + "required": [ + "global", + "shadows", + "midtones", + "highlights" + ], + "short_name": "ColorGrading", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::ColorGradingGlobal": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::ColorGradingGlobal", + "properties": { + "exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "midtones_range": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "post_saturation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "temperature": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "tint": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "exposure", + "temperature", + "tint", + "hue", + "post_saturation", + "midtones_range" + ], + "short_name": "ColorGradingGlobal", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::ColorGradingSection": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::ColorGradingSection", + "properties": { + "contrast": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gain": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gamma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lift": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "saturation", + "contrast", + "gamma", + "gain", + "lift" + ], + "short_name": "ColorGradingSection", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::Msaa": { + "isComponent": false, + "isResource": true, + "long_name": "bevy_render::view::Msaa", + "oneOf": [ + "Off", + "Sample2", + "Sample4", + "Sample8" + ], + "short_name": "Msaa", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_render::view::visibility::InheritedVisibility": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_render::view::visibility::InheritedVisibility", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bool" + } + } + ], + "short_name": "InheritedVisibility", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::view::visibility::NoFrustumCulling": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::view::visibility::NoFrustumCulling", + "properties": {}, + "required": [], + "short_name": "NoFrustumCulling", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::visibility::ViewVisibility": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_render::view::visibility::ViewVisibility", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bool" + } + } + ], + "short_name": "ViewVisibility", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::view::visibility::Visibility": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::view::visibility::Visibility", + "oneOf": [ + "Inherited", + "Hidden", + "Visible" + ], + "short_name": "Visibility", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_render::view::visibility::VisibleEntities": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::view::visibility::VisibleEntities", + "properties": {}, + "required": [], + "short_name": "VisibleEntities", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::visibility::range::VisibilityRange": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::visibility::range::VisibilityRange", + "properties": { + "end_margin": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "start_margin": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + } + }, + "required": [ + "start_margin", + "end_margin" + ], + "short_name": "VisibilityRange", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::visibility::render_layers::RenderLayers": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_render::view::visibility::render_layers::RenderLayers", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/smallvec::SmallVec<[u64; 1]>" + } + } + ], + "short_name": "RenderLayers", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_sprite::SpriteSource": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_sprite::SpriteSource", + "properties": {}, + "required": [], + "short_name": "SpriteSource", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::mesh2d::color_material::ColorMaterial": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::mesh2d::color_material::ColorMaterial", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "texture": { + "type": { + "$ref": "#/$defs/core::option::Option>" + } + } + }, + "required": [ + "color" + ], + "short_name": "ColorMaterial", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::mesh2d::mesh::Mesh2dHandle": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_sprite::mesh2d::mesh::Mesh2dHandle", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + ], + "short_name": "Mesh2dHandle", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_sprite::sprite::Anchor": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::sprite::Anchor", + "oneOf": [ + { + "long_name": "Center" + }, + { + "long_name": "BottomLeft" + }, + { + "long_name": "BottomCenter" + }, + { + "long_name": "BottomRight" + }, + { + "long_name": "CenterLeft" + }, + { + "long_name": "CenterRight" + }, + { + "long_name": "TopLeft" + }, + { + "long_name": "TopCenter" + }, + { + "long_name": "TopRight" + }, + { + "items": false, + "long_name": "Custom", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "Custom", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Anchor", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_sprite::sprite::ImageScaleMode": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_sprite::sprite::ImageScaleMode", + "oneOf": [ + { + "items": false, + "long_name": "Sliced", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::TextureSlicer" + } + } + ], + "short_name": "Sliced", + "type": "array", + "typeInfo": "Tuple" + }, + { + "additionalProperties": false, + "long_name": "Tiled", + "properties": { + "stretch_value": { + "long_name": "stretch_value", + "type": { + "$ref": "#/$defs/f32" + } + }, + "tile_x": { + "long_name": "tile_x", + "type": { + "$ref": "#/$defs/bool" + } + }, + "tile_y": { + "long_name": "tile_y", + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "tile_x", + "tile_y", + "stretch_value" + ], + "short_name": "Tiled", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ImageScaleMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_sprite::sprite::Sprite": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_sprite::sprite::Sprite", + "properties": { + "anchor": { + "type": { + "$ref": "#/$defs/bevy_sprite::sprite::Anchor" + } + }, + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "custom_size": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "flip_x": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "flip_y": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "rect": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + }, + "required": [ + "color", + "flip_x", + "flip_y", + "anchor" + ], + "short_name": "Sprite", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_atlas::TextureAtlas": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_atlas::TextureAtlas", + "properties": { + "index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "layout": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "layout", + "index" + ], + "short_name": "TextureAtlas", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_atlas::TextureAtlasLayout": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_atlas::TextureAtlasLayout", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } + }, + "texture_handles": { + "type": { + "$ref": "#/$defs/core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>" + } + }, + "textures": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "size", + "textures" + ], + "short_name": "TextureAtlasLayout", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_slice::border_rect::BorderRect": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::border_rect::BorderRect", + "properties": { + "bottom": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "left": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "right": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "top": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "left", + "right", + "top", + "bottom" + ], + "short_name": "BorderRect", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_slice::slicer::SliceScaleMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::SliceScaleMode", + "oneOf": [ + { + "long_name": "Stretch" + }, + { + "additionalProperties": false, + "long_name": "Tile", + "properties": { + "stretch_value": { + "long_name": "stretch_value", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "stretch_value" + ], + "short_name": "Tile", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "SliceScaleMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_sprite::texture_slice::slicer::TextureSlicer": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::TextureSlicer", + "properties": { + "border": { + "type": { + "$ref": "#/$defs/bevy_sprite::texture_slice::border_rect::BorderRect" + } + }, + "center_scale_mode": { + "type": { + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::SliceScaleMode" + } + }, + "max_corner_scale": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "sides_scale_mode": { + "type": { + "$ref": "#/$defs/bevy_sprite::texture_slice::slicer::SliceScaleMode" + } + } + }, + "required": [ + "border", + "center_scale_mode", + "sides_scale_mode", + "max_corner_scale" + ], + "short_name": "TextureSlicer", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::font_atlas_set::GlyphAtlasInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::font_atlas_set::GlyphAtlasInfo", + "properties": { + "glyph_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "texture": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "texture_atlas": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "texture_atlas", + "texture", + "glyph_index" + ], + "short_name": "GlyphAtlasInfo", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::glyph_brush::PositionedGlyph": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::glyph_brush::PositionedGlyph", + "properties": { + "atlas_info": { + "type": { + "$ref": "#/$defs/bevy_text::font_atlas_set::GlyphAtlasInfo" + } + }, + "byte_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "position": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "section_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "position", + "size", + "atlas_info", + "section_index", + "byte_index" + ], + "short_name": "PositionedGlyph", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::pipeline::TextLayoutInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_text::pipeline::TextLayoutInfo", + "properties": { + "glyphs": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "logical_size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "glyphs", + "logical_size" + ], + "short_name": "TextLayoutInfo", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::text2d::Text2dBounds": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_text::text2d::Text2dBounds", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "size" + ], + "short_name": "Text2dBounds", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::text::BreakLineOn": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::text::BreakLineOn", + "oneOf": [ + "WordBoundary", + "AnyCharacter", + "NoWrap" + ], + "short_name": "BreakLineOn", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_text::text::JustifyText": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::text::JustifyText", + "oneOf": [ + "Left", + "Center", + "Right" + ], + "short_name": "JustifyText", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_text::text::Text": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_text::text::Text", + "properties": { + "justify": { + "type": { + "$ref": "#/$defs/bevy_text::text::JustifyText" + } + }, + "linebreak_behavior": { + "type": { + "$ref": "#/$defs/bevy_text::text::BreakLineOn" + } + }, + "sections": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "sections", + "justify", + "linebreak_behavior" + ], + "short_name": "Text", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::text::TextSection": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::text::TextSection", + "properties": { + "style": { + "type": { + "$ref": "#/$defs/bevy_text::text::TextStyle" + } + }, + "value": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "value", + "style" + ], + "short_name": "TextSection", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::text::TextStyle": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::text::TextStyle", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "font": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "font_size": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "font", + "font_size", + "color" + ], + "short_name": "TextStyle", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::fixed::Fixed": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::fixed::Fixed", + "properties": { + "overstep": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "timestep": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "timestep", + "overstep" + ], + "short_name": "Fixed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::real::Real": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::real::Real", + "properties": { + "first_update": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "last_update": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "startup": { + "type": { + "$ref": "#/$defs/bevy_utils::Instant" + } + } + }, + "required": [ + "startup" + ], + "short_name": "Real", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::stopwatch::Stopwatch": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::stopwatch::Stopwatch", + "properties": { + "elapsed": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "elapsed", + "paused" + ], + "short_name": "Stopwatch", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::time::Time<()>": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_time::time::Time<()>", + "properties": { + "context": { + "type": { + "$ref": "#/$defs/()" + } + }, + "delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "delta_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "delta_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "elapsed_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_seconds_wrapped": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_wrapped_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_wrapped": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "wrap_period": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "context", + "wrap_period", + "delta", + "delta_seconds", + "delta_seconds_f64", + "elapsed", + "elapsed_seconds", + "elapsed_seconds_f64", + "elapsed_wrapped", + "elapsed_seconds_wrapped", + "elapsed_seconds_wrapped_f64" + ], + "short_name": "Time<()>", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::time::Time": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_time::time::Time", + "properties": { + "context": { + "type": { + "$ref": "#/$defs/bevy_time::fixed::Fixed" + } + }, + "delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "delta_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "delta_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "elapsed_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_seconds_wrapped": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_wrapped_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_wrapped": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "wrap_period": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "context", + "wrap_period", + "delta", + "delta_seconds", + "delta_seconds_f64", + "elapsed", + "elapsed_seconds", + "elapsed_seconds_f64", + "elapsed_wrapped", + "elapsed_seconds_wrapped", + "elapsed_seconds_wrapped_f64" + ], + "short_name": "Time", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::time::Time": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_time::time::Time", + "properties": { + "context": { + "type": { + "$ref": "#/$defs/bevy_time::real::Real" + } + }, + "delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "delta_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "delta_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "elapsed_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_seconds_wrapped": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_wrapped_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_wrapped": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "wrap_period": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "context", + "wrap_period", + "delta", + "delta_seconds", + "delta_seconds_f64", + "elapsed", + "elapsed_seconds", + "elapsed_seconds_f64", + "elapsed_wrapped", + "elapsed_seconds_wrapped", + "elapsed_seconds_wrapped_f64" + ], + "short_name": "Time", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::time::Time": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_time::time::Time", + "properties": { + "context": { + "type": { + "$ref": "#/$defs/bevy_time::virt::Virtual" + } + }, + "delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "delta_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "delta_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "elapsed_seconds": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_seconds_wrapped": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "elapsed_seconds_wrapped_f64": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "elapsed_wrapped": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "wrap_period": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "context", + "wrap_period", + "delta", + "delta_seconds", + "delta_seconds_f64", + "elapsed", + "elapsed_seconds", + "elapsed_seconds_f64", + "elapsed_wrapped", + "elapsed_seconds_wrapped", + "elapsed_seconds_wrapped_f64" + ], + "short_name": "Time", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::timer::Timer": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::timer::Timer", + "properties": { + "duration": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "finished": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "mode": { + "type": { + "$ref": "#/$defs/bevy_time::timer::TimerMode" + } + }, + "stopwatch": { + "type": { + "$ref": "#/$defs/bevy_time::stopwatch::Stopwatch" + } + }, + "times_finished_this_tick": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "stopwatch", + "duration", + "mode", + "finished", + "times_finished_this_tick" + ], + "short_name": "Timer", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::timer::TimerMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::timer::TimerMode", + "oneOf": [ + "Once", + "Repeating" + ], + "short_name": "TimerMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_time::virt::Virtual": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::virt::Virtual", + "properties": { + "effective_speed": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "max_delta": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "paused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "relative_speed": { + "type": { + "$ref": "#/$defs/f64" + } + } + }, + "required": [ + "max_delta", + "paused", + "relative_speed", + "effective_speed" + ], + "short_name": "Virtual", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_transform::components::global_transform::GlobalTransform": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_transform::components::global_transform::GlobalTransform", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Affine3A" + } + } + ], + "short_name": "GlobalTransform", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_transform::components::transform::Transform": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_transform::components::transform::Transform", + "properties": { + "rotation": { + "type": { + "$ref": "#/$defs/glam::Quat" + } + }, + "scale": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + }, + "translation": { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + }, + "required": [ + "translation", + "rotation", + "scale" + ], + "short_name": "Transform", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::UiScale": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_ui::UiScale", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "UiScale", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_ui::focus::FocusPolicy": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::focus::FocusPolicy", + "oneOf": [ + "Block", + "Pass" + ], + "short_name": "FocusPolicy", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::focus::Interaction": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::focus::Interaction", + "oneOf": [ + "Pressed", + "Hovered", + "None" + ], + "short_name": "Interaction", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::focus::RelativeCursorPosition": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::focus::RelativeCursorPosition", + "properties": { + "normalized": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "normalized_visible_node_rect": { + "type": { + "$ref": "#/$defs/bevy_math::rects::rect::Rect" + } + } + }, + "required": [ + "normalized_visible_node_rect" + ], + "short_name": "RelativeCursorPosition", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::geometry::UiRect": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::geometry::UiRect", + "properties": { + "bottom": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + } + }, + "required": [ + "left", + "right", + "top", + "bottom" + ], + "short_name": "UiRect", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::geometry::Val": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::geometry::Val", + "oneOf": [ + { + "long_name": "Auto" + }, + { + "items": false, + "long_name": "Px", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Px", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Percent", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Percent", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Vw", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Vw", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Vh", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Vh", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "VMin", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "VMin", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "VMax", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "VMax", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Val", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_ui::measurement::ContentSize": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::measurement::ContentSize", + "properties": {}, + "required": [], + "short_name": "ContentSize", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::AlignContent": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::AlignContent", + "oneOf": [ + "Default", + "Start", + "End", + "FlexStart", + "FlexEnd", + "Center", + "Stretch", + "SpaceBetween", + "SpaceEvenly", + "SpaceAround" + ], + "short_name": "AlignContent", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::AlignItems": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::AlignItems", + "oneOf": [ + "Default", + "Start", + "End", + "FlexStart", + "FlexEnd", + "Center", + "Baseline", + "Stretch" + ], + "short_name": "AlignItems", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::AlignSelf": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::AlignSelf", + "oneOf": [ + "Auto", + "Start", + "End", + "FlexStart", + "FlexEnd", + "Center", + "Baseline", + "Stretch" + ], + "short_name": "AlignSelf", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::BackgroundColor": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_ui::ui_node::BackgroundColor", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "BackgroundColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_ui::ui_node::BorderColor": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_ui::ui_node::BorderColor", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "BorderColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_ui::ui_node::BorderRadius": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::BorderRadius", + "properties": { + "bottom_left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "bottom_right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top_left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top_right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + } + }, + "required": [ + "top_left", + "top_right", + "bottom_left", + "bottom_right" + ], + "short_name": "BorderRadius", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::CalculatedClip": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::ui_node::CalculatedClip", + "properties": { + "clip": { + "type": { + "$ref": "#/$defs/bevy_math::rects::rect::Rect" + } + } + }, + "required": [ + "clip" + ], + "short_name": "CalculatedClip", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::Direction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::Direction", + "oneOf": [ + "Inherit", + "LeftToRight", + "RightToLeft" + ], + "short_name": "Direction", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::Display": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::Display", + "oneOf": [ + "Flex", + "Grid", + "Block", + "None" + ], + "short_name": "Display", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::FlexDirection": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::FlexDirection", + "oneOf": [ + "Row", + "Column", + "RowReverse", + "ColumnReverse" + ], + "short_name": "FlexDirection", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::FlexWrap": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::FlexWrap", + "oneOf": [ + "NoWrap", + "Wrap", + "WrapReverse" + ], + "short_name": "FlexWrap", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::GridAutoFlow": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::GridAutoFlow", + "oneOf": [ + "Row", + "Column", + "RowDense", + "ColumnDense" + ], + "short_name": "GridAutoFlow", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::GridPlacement": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::GridPlacement", + "properties": { + "end": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "span": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "start": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + }, + "required": [], + "short_name": "GridPlacement", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::GridTrack": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrack", + "properties": { + "max_sizing_function": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::MaxTrackSizingFunction" + } + }, + "min_sizing_function": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::MinTrackSizingFunction" + } + } + }, + "required": [ + "min_sizing_function", + "max_sizing_function" + ], + "short_name": "GridTrack", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::GridTrackRepetition": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrackRepetition", + "oneOf": [ + { + "items": false, + "long_name": "Count", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Count", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "AutoFill" + }, + { + "long_name": "AutoFit" + } + ], + "short_name": "GridTrackRepetition", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::JustifyContent": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::JustifyContent", + "oneOf": [ + "Default", + "Start", + "End", + "FlexStart", + "FlexEnd", + "Center", + "Stretch", + "SpaceBetween", + "SpaceEvenly", + "SpaceAround" + ], + "short_name": "JustifyContent", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::JustifyItems": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::JustifyItems", + "oneOf": [ + "Default", + "Start", + "End", + "Center", + "Baseline", + "Stretch" + ], + "short_name": "JustifyItems", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::JustifySelf": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::JustifySelf", + "oneOf": [ + "Auto", + "Start", + "End", + "Center", + "Baseline", + "Stretch" + ], + "short_name": "JustifySelf", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::MaxTrackSizingFunction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::MaxTrackSizingFunction", + "short_name": "MaxTrackSizingFunction", + "type": "object", + "typeInfo": "Value" + }, + "bevy_ui::ui_node::MinTrackSizingFunction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::MinTrackSizingFunction", + "short_name": "MinTrackSizingFunction", + "type": "object", + "typeInfo": "Value" + }, + "bevy_ui::ui_node::Node": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::ui_node::Node", + "properties": { + "calculated_size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "outline_offset": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "outline_width": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "stack_index": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "unrounded_size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "stack_index", + "calculated_size", + "outline_width", + "outline_offset", + "unrounded_size" + ], + "short_name": "Node", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::Outline": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::ui_node::Outline", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "offset": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "width": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + } + }, + "required": [ + "width", + "offset", + "color" + ], + "short_name": "Outline", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::Overflow": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::Overflow", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::OverflowAxis" + } + }, + "y": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::OverflowAxis" + } + } + }, + "required": [ + "x", + "y" + ], + "short_name": "Overflow", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::OverflowAxis": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::OverflowAxis", + "oneOf": [ + "Visible", + "Clip", + "Hidden" + ], + "short_name": "OverflowAxis", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::PositionType": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::PositionType", + "oneOf": [ + "Relative", + "Absolute" + ], + "short_name": "PositionType", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_ui::ui_node::RepeatedGridTrack": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::RepeatedGridTrack", + "properties": { + "repetition": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrackRepetition" + } + }, + "tracks": { + "type": { + "$ref": "#/$defs/smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" + } + } + }, + "required": [ + "repetition", + "tracks" + ], + "short_name": "RepeatedGridTrack", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::Style": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::ui_node::Style", + "properties": { + "align_content": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::AlignContent" + } + }, + "align_items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::AlignItems" + } + }, + "align_self": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::AlignSelf" + } + }, + "aspect_ratio": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "border": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::UiRect" + } + }, + "bottom": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "column_gap": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "direction": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::Direction" + } + }, + "display": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::Display" + } + }, + "flex_basis": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "flex_direction": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::FlexDirection" + } + }, + "flex_grow": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "flex_shrink": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "flex_wrap": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::FlexWrap" + } + }, + "grid_auto_columns": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "grid_auto_flow": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridAutoFlow" + } + }, + "grid_auto_rows": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "grid_column": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridPlacement" + } + }, + "grid_row": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridPlacement" + } + }, + "grid_template_columns": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "grid_template_rows": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "height": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "justify_content": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::JustifyContent" + } + }, + "justify_items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::JustifyItems" + } + }, + "justify_self": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::JustifySelf" + } + }, + "left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "margin": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::UiRect" + } + }, + "max_height": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "max_width": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "min_height": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "min_width": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "overflow": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::Overflow" + } + }, + "padding": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::UiRect" + } + }, + "position_type": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::PositionType" + } + }, + "right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "row_gap": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "width": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + } + }, + "required": [ + "display", + "position_type", + "overflow", + "direction", + "left", + "right", + "top", + "bottom", + "width", + "height", + "min_width", + "min_height", + "max_width", + "max_height", + "align_items", + "justify_items", + "align_self", + "justify_self", + "align_content", + "justify_content", + "margin", + "padding", + "border", + "flex_direction", + "flex_wrap", + "flex_grow", + "flex_shrink", + "flex_basis", + "row_gap", + "column_gap", + "grid_auto_flow", + "grid_template_rows", + "grid_template_columns", + "grid_auto_rows", + "grid_auto_columns", + "grid_row", + "grid_column" + ], + "short_name": "Style", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::TargetCamera": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_ui::ui_node::TargetCamera", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + ], + "short_name": "TargetCamera", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_ui::ui_node::UiImage": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::ui_node::UiImage", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "flip_x": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "flip_y": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "texture": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "color", + "texture", + "flip_x", + "flip_y" + ], + "short_name": "UiImage", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::ui_node::ZIndex": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::ui_node::ZIndex", + "oneOf": [ + { + "items": false, + "long_name": "Local", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/i32" + } + } + ], + "short_name": "Local", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Global", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/i32" + } + } + ], + "short_name": "Global", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "ZIndex", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_ui::widget::button::Button": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::widget::button::Button", + "properties": {}, + "required": [], + "short_name": "Button", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::widget::image::UiImageSize": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::widget::image::UiImageSize", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } + } + }, + "required": [ + "size" + ], + "short_name": "UiImageSize", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::widget::label::Label": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::widget::label::Label", + "properties": {}, + "required": [], + "short_name": "Label", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_ui::widget::text::TextFlags": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_ui::widget::text::TextFlags", + "properties": { + "needs_new_measure_func": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "needs_recompute": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "needs_new_measure_func", + "needs_recompute" + ], + "short_name": "TextFlags", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_utils::Duration": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_utils::Duration", + "short_name": "Duration", + "type": "object", + "typeInfo": "Value" + }, + "bevy_utils::Instant": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_utils::Instant", + "short_name": "Instant", + "type": "object", + "typeInfo": "Value" + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>", + "short_name": "HashMap, NoOpHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, usize, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>", + "short_name": "HashMap, EntityHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxis" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::AxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonAxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_window::cursor::CursorIcon": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::cursor::CursorIcon", + "oneOf": [ + "Default", + "ContextMenu", + "Help", + "Pointer", + "Progress", + "Wait", + "Cell", + "Crosshair", + "Text", + "VerticalText", + "Alias", + "Copy", + "Move", + "NoDrop", + "NotAllowed", + "Grab", + "Grabbing", + "EResize", + "NResize", + "NeResize", + "NwResize", + "SResize", + "SeResize", + "SwResize", + "WResize", + "EwResize", + "NsResize", + "NeswResize", + "NwseResize", + "ColResize", + "RowResize", + "AllScroll", + "ZoomIn", + "ZoomOut" + ], + "short_name": "CursorIcon", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::event::AppLifecycle": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::AppLifecycle", + "oneOf": [ + "Idle", + "Running", + "WillSuspend", + "Suspended", + "WillResume" + ], + "short_name": "AppLifecycle", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::event::CursorEntered": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::CursorEntered", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "CursorEntered", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::CursorLeft": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::CursorLeft", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "CursorLeft", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::CursorMoved": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::CursorMoved", + "properties": { + "delta": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "position": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "position" + ], + "short_name": "CursorMoved", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::FileDragAndDrop": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::FileDragAndDrop", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "DroppedFile", + "properties": { + "path_buf": { + "long_name": "path_buf", + "type": { + "$ref": "#/$defs/std::path::PathBuf" + } + }, + "window": { + "long_name": "window", + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "path_buf" + ], + "short_name": "DroppedFile", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "HoveredFile", + "properties": { + "path_buf": { + "long_name": "path_buf", + "type": { + "$ref": "#/$defs/std::path::PathBuf" + } + }, + "window": { + "long_name": "window", + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "path_buf" + ], + "short_name": "HoveredFile", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "HoveredFileCanceled", + "properties": { + "window": { + "long_name": "window", + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "HoveredFileCanceled", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "FileDragAndDrop", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_window::event::ReceivedCharacter": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::ReceivedCharacter", + "properties": { + "char": { + "type": { + "$ref": "#/$defs/smol_str::SmolStr" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "char" + ], + "short_name": "ReceivedCharacter", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::RequestRedraw": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::RequestRedraw", + "properties": {}, + "required": [], + "short_name": "RequestRedraw", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowBackendScaleFactorChanged": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowBackendScaleFactorChanged", + "properties": { + "scale_factor": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "scale_factor" + ], + "short_name": "WindowBackendScaleFactorChanged", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowCloseRequested": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowCloseRequested", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "WindowCloseRequested", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowClosed": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowClosed", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "WindowClosed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowClosing": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowClosing", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "WindowClosing", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowCreated": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowCreated", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "WindowCreated", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowFocused": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowFocused", + "properties": { + "focused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "focused" + ], + "short_name": "WindowFocused", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowMoved": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowMoved", + "properties": { + "position": { + "type": { + "$ref": "#/$defs/glam::IVec2" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "position" + ], + "short_name": "WindowMoved", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowOccluded": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowOccluded", + "properties": { + "occluded": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "occluded" + ], + "short_name": "WindowOccluded", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowResized": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowResized", + "properties": { + "height": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "width": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "width", + "height" + ], + "short_name": "WindowResized", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowScaleFactorChanged": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowScaleFactorChanged", + "properties": { + "scale_factor": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "scale_factor" + ], + "short_name": "WindowScaleFactorChanged", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowThemeChanged": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowThemeChanged", + "properties": { + "theme": { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowTheme" + } + }, + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window", + "theme" + ], + "short_name": "WindowThemeChanged", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::CompositeAlphaMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::CompositeAlphaMode", + "oneOf": [ + "Auto", + "Opaque", + "PreMultiplied", + "PostMultiplied", + "Inherit" + ], + "short_name": "CompositeAlphaMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::window::Cursor": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::Cursor", + "properties": { + "grab_mode": { + "type": { + "$ref": "#/$defs/bevy_window::window::CursorGrabMode" + } + }, + "hit_test": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "icon": { + "type": { + "$ref": "#/$defs/bevy_window::cursor::CursorIcon" + } + }, + "visible": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "icon", + "visible", + "grab_mode", + "hit_test" + ], + "short_name": "Cursor", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::CursorGrabMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::CursorGrabMode", + "oneOf": [ + "None", + "Confined", + "Locked" + ], + "short_name": "CursorGrabMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::window::EnabledButtons": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::EnabledButtons", + "properties": { + "close": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "maximize": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "minimize": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "minimize", + "maximize", + "close" + ], + "short_name": "EnabledButtons", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::InternalWindowState": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::InternalWindowState", + "properties": { + "maximize_request": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "minimize_request": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "physical_cursor_position": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + }, + "required": [], + "short_name": "InternalWindowState", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::MonitorSelection": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::MonitorSelection", + "oneOf": [ + { + "long_name": "Current" + }, + { + "long_name": "Primary" + }, + { + "items": false, + "long_name": "Index", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/usize" + } + } + ], + "short_name": "Index", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "MonitorSelection", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_window::window::PresentMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::PresentMode", + "oneOf": [ + "AutoVsync", + "AutoNoVsync", + "Fifo", + "FifoRelaxed", + "Immediate", + "Mailbox" + ], + "short_name": "PresentMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::window::PrimaryWindow": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_window::window::PrimaryWindow", + "properties": {}, + "required": [], + "short_name": "PrimaryWindow", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::Window": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_window::window::Window", + "properties": { + "canvas": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "composite_alpha_mode": { + "type": { + "$ref": "#/$defs/bevy_window::window::CompositeAlphaMode" + } + }, + "cursor": { + "type": { + "$ref": "#/$defs/bevy_window::window::Cursor" + } + }, + "decorations": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "desired_maximum_frame_latency": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "enabled_buttons": { + "type": { + "$ref": "#/$defs/bevy_window::window::EnabledButtons" + } + }, + "fit_canvas_to_parent": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "focused": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "ime_enabled": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "ime_position": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "internal": { + "type": { + "$ref": "#/$defs/bevy_window::window::InternalWindowState" + } + }, + "mode": { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowMode" + } + }, + "name": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "position": { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowPosition" + } + }, + "present_mode": { + "type": { + "$ref": "#/$defs/bevy_window::window::PresentMode" + } + }, + "prevent_default_event_handling": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_doubletap_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_pan_gesture": { + "type": { + "$ref": "#/$defs/core::option::Option<(u8, u8)>" + } + }, + "recognize_pinch_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_rotation_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "resizable": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "resize_constraints": { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowResizeConstraints" + } + }, + "resolution": { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowResolution" + } + }, + "skip_taskbar": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "title": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "transparent": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "visible": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "window_level": { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowLevel" + } + }, + "window_theme": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + }, + "required": [ + "cursor", + "present_mode", + "mode", + "position", + "resolution", + "title", + "composite_alpha_mode", + "resize_constraints", + "resizable", + "enabled_buttons", + "decorations", + "transparent", + "focused", + "window_level", + "fit_canvas_to_parent", + "prevent_default_event_handling", + "internal", + "ime_enabled", + "ime_position", + "visible", + "skip_taskbar", + "recognize_pinch_gesture", + "recognize_rotation_gesture", + "recognize_doubletap_gesture" + ], + "short_name": "Window", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::WindowLevel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::WindowLevel", + "oneOf": [ + "AlwaysOnBottom", + "Normal", + "AlwaysOnTop" + ], + "short_name": "WindowLevel", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::window::WindowMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::WindowMode", + "oneOf": [ + "Windowed", + "BorderlessFullscreen", + "SizedFullscreen", + "Fullscreen" + ], + "short_name": "WindowMode", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_window::window::WindowPosition": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::WindowPosition", + "oneOf": [ + { + "long_name": "Automatic" + }, + { + "items": false, + "long_name": "Centered", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_window::window::MonitorSelection" + } + } + ], + "short_name": "Centered", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "At", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::IVec2" + } + } + ], + "short_name": "At", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "WindowPosition", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_window::window::WindowResizeConstraints": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::WindowResizeConstraints", + "properties": { + "max_height": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "max_width": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "min_height": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "min_width": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "min_width", + "min_height", + "max_width", + "max_height" + ], + "short_name": "WindowResizeConstraints", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::WindowResolution": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::WindowResolution", + "properties": { + "physical_height": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "physical_width": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "scale_factor": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scale_factor_override": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + } + }, + "required": [ + "physical_width", + "physical_height", + "scale_factor" + ], + "short_name": "WindowResolution", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::window::WindowTheme": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::window::WindowTheme", + "oneOf": [ + "Light", + "Dark" + ], + "short_name": "WindowTheme", + "type": "string", + "typeInfo": "Enum" + }, + "blenvy::blueprints::animation::AnimationInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfo", + "properties": { + "frame_end": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_end_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frames_length": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "frame_start", + "frame_end", + "frames_length", + "frame_start_override", + "frame_end_override" + ], + "short_name": "AnimationInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationInfos": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfos", + "properties": { + "animations": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "animations" + ], + "short_name": "AnimationInfos", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationMarkers": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::animation::AnimationMarkers", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "AnimationMarkers", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::animation::BlueprintAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::BlueprintAnimations", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + }, + "named_indices": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations", + "named_indices", + "graph" + ], + "short_name": "BlueprintAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::SceneAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::SceneAnimations", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + }, + "named_indices": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations", + "named_indices", + "graph" + ], + "short_name": "SceneAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::BlueprintAsset": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::BlueprintAsset", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "BlueprintAsset", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::BlueprintAssets": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::BlueprintAssets", + "properties": { + "assets": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "loaded": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "progress": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "assets", + "loaded", + "progress" + ], + "short_name": "BlueprintAssets", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::materials::MaterialInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::materials::MaterialInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "MaterialInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::BlueprintInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::BlueprintInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "BlueprintInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::HideUntilReady": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::HideUntilReady", + "properties": {}, + "required": [], + "short_name": "HideUntilReady", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::SpawnBlueprint": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::SpawnBlueprint", + "properties": {}, + "required": [], + "short_name": "SpawnBlueprint", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::GltfProcessed": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::GltfProcessed", + "properties": {}, + "required": [], + "short_name": "GltfProcessed", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderBackgroundShader": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderBackgroundShader", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "color", + "strength" + ], + "short_name": "BlenderBackgroundShader", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderColorGrading": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderColorGrading", + "properties": { + "exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gamma": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "exposure", + "gamma" + ], + "short_name": "BlenderColorGrading", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderLightShadows": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderLightShadows", + "properties": { + "buffer_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "buffer_bias" + ], + "short_name": "BlenderLightShadows", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderShadowSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderShadowSettings", + "properties": { + "cascade_size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "cascade_size" + ], + "short_name": "BlenderShadowSettings", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderToneMapping": { + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderToneMapping", + "oneOf": [ + "None", + "AgX", + "Filmic" + ], + "short_name": "BlenderToneMapping", + "type": "string", + "typeInfo": "Enum" + }, + "blenvy_components_example::component_examples::BasicTest": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_components_example::component_examples::BasicTest", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "c": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "a", + "b", + "c" + ], + "short_name": "BasicTest", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy_components_example::component_examples::EnumTest": { + "isComponent": true, + "isResource": false, + "long_name": "blenvy_components_example::component_examples::EnumTest", + "oneOf": [ + "Metal", + "Wood", + "Rock", + "Cloth", + "Squishy", + "None" + ], + "short_name": "EnumTest", + "type": "string", + "typeInfo": "Enum" + }, + "blenvy_components_example::component_examples::TupleTest2": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleTest2", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + }, + { + "type": { + "$ref": "#/$defs/u64" + } + }, + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "TupleTest2", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleTestBool": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleTestBool", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bool" + } + } + ], + "short_name": "TupleTestBool", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleTestColor": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleTestColor", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "TupleTestColor", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleTestF32": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleTestF32", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "TupleTestF32", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleTestStr": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleTestStr", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "TupleTestStr", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleTestU64": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleTestU64", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u64" + } + } + ], + "short_name": "TupleTestU64", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleVec": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleVec", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "TupleVec", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleVec2": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleVec2", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "TupleVec2", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::TupleVec3": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy_components_example::component_examples::TupleVec3", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + ], + "short_name": "TupleVec3", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy_components_example::component_examples::UnitTest": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy_components_example::component_examples::UnitTest", + "properties": {}, + "required": [], + "short_name": "UnitTest", + "type": "object", + "typeInfo": "Struct" + }, + "bool": { + "isComponent": false, + "isResource": false, + "long_name": "bool", + "short_name": "bool", + "type": "boolean", + "typeInfo": "Value" + }, + "char": { + "isComponent": false, + "isResource": false, + "long_name": "char", + "short_name": "char", + "type": "string", + "typeInfo": "Value" + }, + "core::num::NonZeroI16": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroI16", + "short_name": "NonZeroI16", + "type": "object", + "typeInfo": "Value" + }, + "core::num::NonZeroU16": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroU16", + "short_name": "NonZeroU16", + "type": "object", + "typeInfo": "Value" + }, + "core::num::NonZeroU32": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroU32", + "short_name": "NonZeroU32", + "type": "object", + "typeInfo": "Value" + }, + "core::ops::Range": { + "isComponent": false, + "isResource": false, + "long_name": "core::ops::Range", + "short_name": "Range", + "type": "object", + "typeInfo": "Value" + }, + "core::option::Option<(u8, u8)>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option<(u8, u8)>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/(u8, u8)" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option<(u8, u8)>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_audio::audio::SpatialScale" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::touch::ForceTouch" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_math::rects::rect::Rect" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::camera::camera::Viewport" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_render::mesh::mesh::Indices" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::Instant" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option, usize, DefaultHashBuilder>>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowTheme" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bool" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/char" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroI16" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroU16" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroU32" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f64" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::DVec2" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "f32": { + "isComponent": false, + "isResource": false, + "long_name": "f32", + "short_name": "f32", + "type": "float", + "typeInfo": "Value" + }, + "f64": { + "isComponent": false, + "isResource": false, + "long_name": "f64", + "short_name": "f64", + "type": "float", + "typeInfo": "Value" + }, + "glam::Affine2": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Affine2", + "properties": { + "matrix2": { + "type": { + "$ref": "#/$defs/glam::Mat2" + } + }, + "translation": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "matrix2", + "translation" + ], + "short_name": "Affine2", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Affine3A": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Affine3A", + "properties": { + "matrix3": { + "type": { + "$ref": "#/$defs/glam::Mat3A" + } + }, + "translation": { + "type": { + "$ref": "#/$defs/glam::Vec3A" + } + } + }, + "required": [ + "matrix3", + "translation" + ], + "short_name": "Affine3A", + "type": "object", + "typeInfo": "Struct" + }, + "glam::DVec2": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::DVec2", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/f64" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f64" + } + } + }, + "required": [ + "x", + "y" + ], + "short_name": "DVec2", + "type": "object", + "typeInfo": "Struct" + }, + "glam::IVec2": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::IVec2", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/i32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/i32" + } + } + }, + "required": [ + "x", + "y" + ], + "short_name": "IVec2", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Mat2": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Mat2", + "properties": { + "x_axis": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "y_axis": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "x_axis", + "y_axis" + ], + "short_name": "Mat2", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Mat3A": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Mat3A", + "properties": { + "x_axis": { + "type": { + "$ref": "#/$defs/glam::Vec3A" + } + }, + "y_axis": { + "type": { + "$ref": "#/$defs/glam::Vec3A" + } + }, + "z_axis": { + "type": { + "$ref": "#/$defs/glam::Vec3A" + } + } + }, + "required": [ + "x_axis", + "y_axis", + "z_axis" + ], + "short_name": "Mat3A", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Mat4": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Mat4", + "properties": { + "w_axis": { + "type": { + "$ref": "#/$defs/glam::Vec4" + } + }, + "x_axis": { + "type": { + "$ref": "#/$defs/glam::Vec4" + } + }, + "y_axis": { + "type": { + "$ref": "#/$defs/glam::Vec4" + } + }, + "z_axis": { + "type": { + "$ref": "#/$defs/glam::Vec4" + } + } + }, + "required": [ + "x_axis", + "y_axis", + "z_axis", + "w_axis" + ], + "short_name": "Mat4", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Quat": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Quat", + "properties": { + "w": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z", + "w" + ], + "short_name": "Quat", + "type": "object", + "typeInfo": "Struct" + }, + "glam::UVec2": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::UVec2", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "x", + "y" + ], + "short_name": "UVec2", + "type": "object", + "typeInfo": "Struct" + }, + "glam::UVec3": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::UVec3", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "x", + "y", + "z" + ], + "short_name": "UVec3", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Vec2": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Vec2", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y" + ], + "short_name": "Vec2", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Vec3": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Vec3", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z" + ], + "short_name": "Vec3", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Vec3A": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Vec3A", + "properties": { + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z" + ], + "short_name": "Vec3A", + "type": "object", + "typeInfo": "Struct" + }, + "glam::Vec4": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "glam::Vec4", + "properties": { + "w": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z", + "w" + ], + "short_name": "Vec4", + "type": "object", + "typeInfo": "Struct" + }, + "i128": { + "isComponent": false, + "isResource": false, + "long_name": "i128", + "short_name": "i128", + "type": "int", + "typeInfo": "Value" + }, + "i16": { + "isComponent": false, + "isResource": false, + "long_name": "i16", + "short_name": "i16", + "type": "int", + "typeInfo": "Value" + }, + "i32": { + "isComponent": false, + "isResource": false, + "long_name": "i32", + "short_name": "i32", + "type": "int", + "typeInfo": "Value" + }, + "i64": { + "isComponent": false, + "isResource": false, + "long_name": "i64", + "short_name": "i64", + "type": "int", + "typeInfo": "Value" + }, + "i8": { + "isComponent": false, + "isResource": false, + "long_name": "i8", + "short_name": "i8", + "type": "int", + "typeInfo": "Value" + }, + "isize": { + "isComponent": false, + "isResource": false, + "long_name": "isize", + "short_name": "isize", + "type": "int", + "typeInfo": "Value" + }, + "petgraph::graph::DiGraph": { + "isComponent": false, + "isResource": false, + "long_name": "petgraph::graph::DiGraph", + "short_name": "DiGraph", + "type": "object", + "typeInfo": "Value" + }, + "petgraph::graph::NodeIndex": { + "isComponent": false, + "isResource": false, + "long_name": "petgraph::graph::NodeIndex", + "short_name": "NodeIndex", + "type": "object", + "typeInfo": "Value" + }, + "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", + "short_name": "SmallVec<[Entity; 8]>", + "type": "array", + "typeInfo": "List" + }, + "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" + } + }, + "long_name": "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>", + "short_name": "SmallVec<[GridTrack; 1]>", + "type": "array", + "typeInfo": "List" + }, + "smallvec::SmallVec<[u64; 1]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "long_name": "smallvec::SmallVec<[u64; 1]>", + "short_name": "SmallVec<[u64; 1]>", + "type": "array", + "typeInfo": "List" + }, + "smol_str::SmolStr": { + "isComponent": false, + "isResource": false, + "long_name": "smol_str::SmolStr", + "short_name": "SmolStr", + "type": "object", + "typeInfo": "Value" + }, + "std::collections::BTreeMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "std::collections::BTreeMap", + "short_name": "BTreeMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_animation::ActiveAnimation" + } + } + }, + "std::path::PathBuf": { + "isComponent": false, + "isResource": false, + "long_name": "std::path::PathBuf", + "short_name": "PathBuf", + "type": "object", + "typeInfo": "Value" + }, + "std::sync::Arc": { + "isComponent": false, + "isResource": false, + "long_name": "std::sync::Arc", + "short_name": "Arc", + "type": "object", + "typeInfo": "Value" + }, + "u128": { + "isComponent": false, + "isResource": false, + "long_name": "u128", + "short_name": "u128", + "type": "uint", + "typeInfo": "Value" + }, + "u16": { + "isComponent": false, + "isResource": false, + "long_name": "u16", + "short_name": "u16", + "type": "uint", + "typeInfo": "Value" + }, + "u32": { + "isComponent": false, + "isResource": false, + "long_name": "u32", + "short_name": "u32", + "type": "uint", + "typeInfo": "Value" + }, + "u64": { + "isComponent": false, + "isResource": false, + "long_name": "u64", + "short_name": "u64", + "type": "uint", + "typeInfo": "Value" + }, + "u8": { + "isComponent": false, + "isResource": false, + "long_name": "u8", + "short_name": "u8", + "type": "uint", + "typeInfo": "Value" + }, + "usize": { + "isComponent": false, + "isResource": false, + "long_name": "usize", + "short_name": "usize", + "type": "uint", + "typeInfo": "Value" + }, + "uuid::Uuid": { + "isComponent": false, + "isResource": false, + "long_name": "uuid::Uuid", + "short_name": "Uuid", + "type": "object", + "typeInfo": "Value" + } + }, + "$schema": "https://json-schema.org/draft/2020-12/schema", + "long_name": "bevy component registry schema" +} \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/basic/index.html b/examples/blenvy/components/index.html similarity index 100% rename from examples/bevy_gltf_blueprints/basic/index.html rename to examples/blenvy/components/index.html diff --git a/examples/bevy_gltf_blueprints/basic/src/test_components.rs b/examples/blenvy/components/src/component_examples.rs similarity index 96% rename from examples/bevy_gltf_blueprints/basic/src/test_components.rs rename to examples/blenvy/components/src/component_examples.rs index b5384e2..e5d7cef 100644 --- a/examples/bevy_gltf_blueprints/basic/src/test_components.rs +++ b/examples/blenvy/components/src/component_examples.rs @@ -60,8 +60,8 @@ pub enum EnumTest { None, } -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { +pub struct ComponentsExamplesPlugin; +impl Plugin for ComponentsExamplesPlugin { fn build(&self, app: &mut App) { app.register_type::() .register_type::() diff --git a/examples/blenvy/components/src/main.rs b/examples/blenvy/components/src/main.rs new file mode 100644 index 0000000..7c2ad47 --- /dev/null +++ b/examples/blenvy/components/src/main.rs @@ -0,0 +1,32 @@ +use bevy::prelude::*; +use blenvy::{BlenvyPlugin, BlueprintInfo, GameWorldTag, HideUntilReady, SpawnBlueprint}; + +mod component_examples; +use component_examples::*; + +fn main() { + App::new() + .add_plugins(( + DefaultPlugins.set(AssetPlugin::default()), + // our custom plugins + ComponentsExamplesPlugin, // Showcases different type of components /structs + BlenvyPlugin::default() + )) + + .add_systems(Startup, setup_game) + .run(); +} + + +fn setup_game( + mut commands: Commands, +) { + + // here we actually spawn our game world/level + commands.spawn(( + BlueprintInfo::from_path("levels/World.glb"), // all we need is a Blueprint info... + SpawnBlueprint, // and spawnblueprint to tell blenvy to spawn the blueprint now + HideUntilReady, // only reveal the level once it is ready + GameWorldTag, + )); +} diff --git a/examples/blenvy/demo/Cargo.toml b/examples/blenvy/demo/Cargo.toml new file mode 100644 index 0000000..b26b54a --- /dev/null +++ b/examples/blenvy/demo/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "blenvy_demo" +version = "0.3.0" +edition = "2021" +license = "MIT OR Apache-2.0" + +[dependencies] +bevy = { version = "0.14", features = ["dynamic_linking"] } +blenvy = { path = "../../../crates/blenvy" } +bevy_rapier3d = { version = "0.25.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/README.md b/examples/blenvy/demo/README.md similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/README.md rename to examples/blenvy/demo/README.md diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/common.blend b/examples/blenvy/demo/art/common.blend similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/common.blend rename to examples/blenvy/demo/art/common.blend diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level1.blend b/examples/blenvy/demo/art/level1.blend similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level1.blend rename to examples/blenvy/demo/art/level1.blend diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level2.blend b/examples/blenvy/demo/art/level2.blend similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/level2.blend rename to examples/blenvy/demo/art/level2.blend diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/start_level.blend b/examples/blenvy/demo/art/start_level.blend similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/start_level.blend rename to examples/blenvy/demo/art/start_level.blend diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/materials/common_materials_library.glb b/examples/blenvy/demo/assets/materials/common_materials_library.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/materials/common_materials_library.glb rename to examples/blenvy/demo/assets/materials/common_materials_library.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level1.glb b/examples/blenvy/demo/assets/models/Level1.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level1.glb rename to examples/blenvy/demo/assets/models/Level1.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level2.glb b/examples/blenvy/demo/assets/models/Level2.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/Level2.glb rename to examples/blenvy/demo/assets/models/Level2.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/StartLevel.glb b/examples/blenvy/demo/assets/models/StartLevel.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/StartLevel.glb rename to examples/blenvy/demo/assets/models/StartLevel.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Container.glb b/examples/blenvy/demo/assets/models/library/Container.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Container.glb rename to examples/blenvy/demo/assets/models/library/Container.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Crystal.glb b/examples/blenvy/demo/assets/models/library/Crystal.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Crystal.glb rename to examples/blenvy/demo/assets/models/library/Crystal.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Health_Pickup.glb b/examples/blenvy/demo/assets/models/library/Health_Pickup.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Health_Pickup.glb rename to examples/blenvy/demo/assets/models/library/Health_Pickup.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Interactible.glb b/examples/blenvy/demo/assets/models/library/Interactible.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Interactible.glb rename to examples/blenvy/demo/assets/models/library/Interactible.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/LevelTransition.glb b/examples/blenvy/demo/assets/models/library/LevelTransition.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/LevelTransition.glb rename to examples/blenvy/demo/assets/models/library/LevelTransition.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/MagicTeapot.glb b/examples/blenvy/demo/assets/models/library/MagicTeapot.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/MagicTeapot.glb rename to examples/blenvy/demo/assets/models/library/MagicTeapot.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Nest_test.glb b/examples/blenvy/demo/assets/models/library/Nest_test.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Nest_test.glb rename to examples/blenvy/demo/assets/models/library/Nest_test.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Pillar.glb b/examples/blenvy/demo/assets/models/library/Pillar.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Pillar.glb rename to examples/blenvy/demo/assets/models/library/Pillar.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Player.glb b/examples/blenvy/demo/assets/models/library/Player.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Player.glb rename to examples/blenvy/demo/assets/models/library/Player.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Portal.glb b/examples/blenvy/demo/assets/models/library/Portal.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Portal.glb rename to examples/blenvy/demo/assets/models/library/Portal.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock Pile.glb b/examples/blenvy/demo/assets/models/library/Rock Pile.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock Pile.glb rename to examples/blenvy/demo/assets/models/library/Rock Pile.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock.glb b/examples/blenvy/demo/assets/models/library/Rock.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Rock.glb rename to examples/blenvy/demo/assets/models/library/Rock.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Sub_blueprint.glb b/examples/blenvy/demo/assets/models/library/Sub_blueprint.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Sub_blueprint.glb rename to examples/blenvy/demo/assets/models/library/Sub_blueprint.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Template_Demo.glb b/examples/blenvy/demo/assets/models/library/Template_Demo.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Template_Demo.glb rename to examples/blenvy/demo/assets/models/library/Template_Demo.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Unused_in_level_test.glb b/examples/blenvy/demo/assets/models/library/Unused_in_level_test.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Unused_in_level_test.glb rename to examples/blenvy/demo/assets/models/library/Unused_in_level_test.glb diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Wall.glb b/examples/blenvy/demo/assets/models/library/Wall.glb similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/assets/models/library/Wall.glb rename to examples/blenvy/demo/assets/models/library/Wall.glb diff --git a/examples/common/src/core/audio/mod.rs b/examples/blenvy/demo/src/core/audio/mod.rs similarity index 100% rename from examples/common/src/core/audio/mod.rs rename to examples/blenvy/demo/src/core/audio/mod.rs diff --git a/examples/common/src/core/camera/camera_replace_proxies.rs b/examples/blenvy/demo/src/core/camera/camera_replace_proxies.rs similarity index 100% rename from examples/common/src/core/camera/camera_replace_proxies.rs rename to examples/blenvy/demo/src/core/camera/camera_replace_proxies.rs diff --git a/examples/common/src/core/camera/camera_tracking.rs b/examples/blenvy/demo/src/core/camera/camera_tracking.rs similarity index 100% rename from examples/common/src/core/camera/camera_tracking.rs rename to examples/blenvy/demo/src/core/camera/camera_tracking.rs diff --git a/examples/common/src/core/camera/mod.rs b/examples/blenvy/demo/src/core/camera/mod.rs similarity index 100% rename from examples/common/src/core/camera/mod.rs rename to examples/blenvy/demo/src/core/camera/mod.rs diff --git a/examples/bevy_gltf_blueprints/materials/src/core/mod.rs b/examples/blenvy/demo/src/core/mod.rs similarity index 83% rename from examples/bevy_gltf_blueprints/materials/src/core/mod.rs rename to examples/blenvy/demo/src/core/mod.rs index 37d9f8c..be162a5 100644 --- a/examples/bevy_gltf_blueprints/materials/src/core/mod.rs +++ b/examples/blenvy/demo/src/core/mod.rs @@ -5,7 +5,6 @@ pub struct CorePlugin; impl Plugin for CorePlugin { fn build(&self, app: &mut App) { app.add_plugins((BlueprintsPlugin { - library_folder: "models/library".into(), material_library: true, ..Default::default() },)); diff --git a/examples/common_rapier/src/physics/controls.rs b/examples/blenvy/demo/src/core/physics_rapier/controls.rs similarity index 100% rename from examples/common_rapier/src/physics/controls.rs rename to examples/blenvy/demo/src/core/physics_rapier/controls.rs diff --git a/examples/common_rapier/src/physics/mod.rs b/examples/blenvy/demo/src/core/physics_rapier/mod.rs similarity index 100% rename from examples/common_rapier/src/physics/mod.rs rename to examples/blenvy/demo/src/core/physics_rapier/mod.rs diff --git a/examples/common_rapier/src/physics/physics_replace_proxies.rs b/examples/blenvy/demo/src/core/physics_rapier/physics_replace_proxies.rs similarity index 100% rename from examples/common_rapier/src/physics/physics_replace_proxies.rs rename to examples/blenvy/demo/src/core/physics_rapier/physics_replace_proxies.rs diff --git a/examples/common_rapier/src/physics/utils.rs b/examples/blenvy/demo/src/core/physics_rapier/utils.rs similarity index 100% rename from examples/common_rapier/src/physics/utils.rs rename to examples/blenvy/demo/src/core/physics_rapier/utils.rs diff --git a/examples/common_xpbd/src/physics/controls.rs b/examples/blenvy/demo/src/core/physics_xpbd/controls.rs similarity index 100% rename from examples/common_xpbd/src/physics/controls.rs rename to examples/blenvy/demo/src/core/physics_xpbd/controls.rs diff --git a/examples/common_xpbd/src/physics/mod.rs b/examples/blenvy/demo/src/core/physics_xpbd/mod.rs similarity index 100% rename from examples/common_xpbd/src/physics/mod.rs rename to examples/blenvy/demo/src/core/physics_xpbd/mod.rs diff --git a/examples/common_xpbd/src/physics/physics_replace_proxies.rs b/examples/blenvy/demo/src/core/physics_xpbd/physics_replace_proxies.rs similarity index 100% rename from examples/common_xpbd/src/physics/physics_replace_proxies.rs rename to examples/blenvy/demo/src/core/physics_xpbd/physics_replace_proxies.rs diff --git a/examples/common_xpbd/src/physics/utils.rs b/examples/blenvy/demo/src/core/physics_xpbd/utils.rs similarity index 100% rename from examples/common_xpbd/src/physics/utils.rs rename to examples/blenvy/demo/src/core/physics_xpbd/utils.rs diff --git a/examples/common/src/core/relationships/mod.rs b/examples/blenvy/demo/src/core/relationships/mod.rs similarity index 100% rename from examples/common/src/core/relationships/mod.rs rename to examples/blenvy/demo/src/core/relationships/mod.rs diff --git a/examples/common/src/core/relationships/relationships_insert_dependant_components.rs b/examples/blenvy/demo/src/core/relationships/relationships_insert_dependant_components.rs similarity index 100% rename from examples/common/src/core/relationships/relationships_insert_dependant_components.rs rename to examples/blenvy/demo/src/core/relationships/relationships_insert_dependant_components.rs diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_game.rs b/examples/blenvy/demo/src/game/in_game.rs similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/in_game.rs rename to examples/blenvy/demo/src/game/in_game.rs diff --git a/examples/bevy_gltf_blueprints/animation/src/game/in_main_menu.rs b/examples/blenvy/demo/src/game/in_main_menu.rs similarity index 100% rename from examples/bevy_gltf_blueprints/animation/src/game/in_main_menu.rs rename to examples/blenvy/demo/src/game/in_main_menu.rs diff --git a/examples/common/src/game/interactions/mod.rs b/examples/blenvy/demo/src/game/interactions/mod.rs similarity index 100% rename from examples/common/src/game/interactions/mod.rs rename to examples/blenvy/demo/src/game/interactions/mod.rs diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/level_transitions.rs b/examples/blenvy/demo/src/game/level_transitions.rs similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/level_transitions.rs rename to examples/blenvy/demo/src/game/level_transitions.rs diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/mod.rs b/examples/blenvy/demo/src/game/mod.rs similarity index 100% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/game/mod.rs rename to examples/blenvy/demo/src/game/mod.rs diff --git a/examples/common/src/game/picking/mod.rs b/examples/blenvy/demo/src/game/picking/mod.rs similarity index 100% rename from examples/common/src/game/picking/mod.rs rename to examples/blenvy/demo/src/game/picking/mod.rs diff --git a/examples/common/src/game/player/mod.rs b/examples/blenvy/demo/src/game/player/mod.rs similarity index 100% rename from examples/common/src/game/player/mod.rs rename to examples/blenvy/demo/src/game/player/mod.rs diff --git a/examples/bevy_gltf_blueprints/animation/src/main.rs b/examples/blenvy/demo/src/main.rs similarity index 100% rename from examples/bevy_gltf_blueprints/animation/src/main.rs rename to examples/blenvy/demo/src/main.rs diff --git a/examples/common/src/state.rs b/examples/blenvy/demo/src/state.rs similarity index 100% rename from examples/common/src/state.rs rename to examples/blenvy/demo/src/state.rs diff --git a/examples/bevy_gltf_blueprints/animation/src/test_components.rs b/examples/blenvy/demo/src/test_components.rs similarity index 100% rename from examples/bevy_gltf_blueprints/animation/src/test_components.rs rename to examples/blenvy/demo/src/test_components.rs diff --git a/examples/blenvy/save_load/Cargo.toml b/examples/blenvy/save_load/Cargo.toml new file mode 100644 index 0000000..ad3bb60 --- /dev/null +++ b/examples/blenvy/save_load/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "bevy_gltf_save_load_basic_example" +version = "0.3.0" +edition = "2021" +license = "MIT OR Apache-2.0" + +[dependencies] +bevy = { version = "0.14", features = ["dynamic_linking"] } +blenvy = { path = "../../../crates/blenvy" } + +serde_json = "1.0.108" +serde = "1.0.193" +rand = "0.8.5" \ No newline at end of file diff --git a/examples/bevy_gltf_save_load/basic/README.md b/examples/blenvy/save_load/README.md similarity index 85% rename from examples/bevy_gltf_save_load/basic/README.md rename to examples/blenvy/save_load/README.md index d680ade..0eea8d9 100644 --- a/examples/bevy_gltf_save_load/basic/README.md +++ b/examples/blenvy/save_load/README.md @@ -4,7 +4,7 @@ This example showcases how to use ```bevy_save_load``` crate to save & load your ## Notes Workflow with blender / demo information -- the gltf files for this demo where generated using the **Export dynamic and static objects seperatly** feature of the auto_export addon: +- the gltf files for this demo where generated using the **Export dynamic and static objects seperatly** feature of the blenvy addon: so the static & dynamic level files where generated automatically, based on the entities that have a **Dynamic** component/custom property diff --git a/examples/bevy_gltf_blueprints/animation/assets/assets_core.assets.ron b/examples/blenvy/save_load/assets/assets_core.assets.ron similarity index 100% rename from examples/bevy_gltf_blueprints/animation/assets/assets_core.assets.ron rename to examples/blenvy/save_load/assets/assets_core.assets.ron diff --git a/examples/bevy_gltf_save_load/basic/assets/assets_game.assets.ron b/examples/blenvy/save_load/assets/assets_game.assets.ron similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/assets_game.assets.ron rename to examples/blenvy/save_load/assets/assets_game.assets.ron diff --git a/examples/bevy_gltf_save_load/basic/assets/basic.blend b/examples/blenvy/save_load/assets/basic.blend similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/basic.blend rename to examples/blenvy/save_load/assets/basic.blend diff --git a/examples/bevy_gltf_save_load/basic/assets/models/World.glb b/examples/blenvy/save_load/assets/models/World.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/World.glb rename to examples/blenvy/save_load/assets/models/World.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/World_dynamic.glb b/examples/blenvy/save_load/assets/models/World_dynamic.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/World_dynamic.glb rename to examples/blenvy/save_load/assets/models/World_dynamic.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Container.glb b/examples/blenvy/save_load/assets/models/library/Container.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/Container.glb rename to examples/blenvy/save_load/assets/models/library/Container.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Ground.glb b/examples/blenvy/save_load/assets/models/library/Ground.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/Ground.glb rename to examples/blenvy/save_load/assets/models/library/Ground.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Health_Pickup.glb b/examples/blenvy/save_load/assets/models/library/Health_Pickup.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/Health_Pickup.glb rename to examples/blenvy/save_load/assets/models/library/Health_Pickup.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/MagicTeapot.glb b/examples/blenvy/save_load/assets/models/library/MagicTeapot.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/MagicTeapot.glb rename to examples/blenvy/save_load/assets/models/library/MagicTeapot.glb diff --git a/examples/bevy_gltf_blueprints/animation/assets/models/library/Pillar.glb b/examples/blenvy/save_load/assets/models/library/Pillar.glb similarity index 100% rename from examples/bevy_gltf_blueprints/animation/assets/models/library/Pillar.glb rename to examples/blenvy/save_load/assets/models/library/Pillar.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Player.glb b/examples/blenvy/save_load/assets/models/library/Player.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/Player.glb rename to examples/blenvy/save_load/assets/models/library/Player.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Sphero.glb b/examples/blenvy/save_load/assets/models/library/Sphero.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/Sphero.glb rename to examples/blenvy/save_load/assets/models/library/Sphero.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/models/library/Unused_in_level_test.glb b/examples/blenvy/save_load/assets/models/library/Unused_in_level_test.glb similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/models/library/Unused_in_level_test.glb rename to examples/blenvy/save_load/assets/models/library/Unused_in_level_test.glb diff --git a/examples/bevy_gltf_save_load/basic/assets/scenes/save.scn.ron b/examples/blenvy/save_load/assets/scenes/save.scn.ron similarity index 100% rename from examples/bevy_gltf_save_load/basic/assets/scenes/save.scn.ron rename to examples/blenvy/save_load/assets/scenes/save.scn.ron diff --git a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/test_components.rs b/examples/blenvy/save_load/src/component_examples.rs similarity index 96% rename from examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/test_components.rs rename to examples/blenvy/save_load/src/component_examples.rs index b5384e2..e5d7cef 100644 --- a/examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/src/test_components.rs +++ b/examples/blenvy/save_load/src/component_examples.rs @@ -60,8 +60,8 @@ pub enum EnumTest { None, } -pub struct ComponentsTestPlugin; -impl Plugin for ComponentsTestPlugin { +pub struct ComponentsExamplesPlugin; +impl Plugin for ComponentsExamplesPlugin { fn build(&self, app: &mut App) { app.register_type::() .register_type::() diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_game.rs b/examples/blenvy/save_load/src/game/in_game.rs similarity index 100% rename from examples/bevy_gltf_save_load/basic/src/game/in_game.rs rename to examples/blenvy/save_load/src/game/in_game.rs diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_game_loading.rs b/examples/blenvy/save_load/src/game/in_game_loading.rs similarity index 100% rename from examples/bevy_gltf_save_load/basic/src/game/in_game_loading.rs rename to examples/blenvy/save_load/src/game/in_game_loading.rs diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_game_saving.rs b/examples/blenvy/save_load/src/game/in_game_saving.rs similarity index 100% rename from examples/bevy_gltf_save_load/basic/src/game/in_game_saving.rs rename to examples/blenvy/save_load/src/game/in_game_saving.rs diff --git a/examples/bevy_gltf_save_load/basic/src/game/in_main_menu.rs b/examples/blenvy/save_load/src/game/in_main_menu.rs similarity index 100% rename from examples/bevy_gltf_save_load/basic/src/game/in_main_menu.rs rename to examples/blenvy/save_load/src/game/in_main_menu.rs diff --git a/examples/bevy_gltf_save_load/basic/src/game/mod.rs b/examples/blenvy/save_load/src/game/mod.rs similarity index 100% rename from examples/bevy_gltf_save_load/basic/src/game/mod.rs rename to examples/blenvy/save_load/src/game/mod.rs diff --git a/examples/blenvy/save_load/src/main.rs b/examples/blenvy/save_load/src/main.rs new file mode 100644 index 0000000..fd64b90 --- /dev/null +++ b/examples/blenvy/save_load/src/main.rs @@ -0,0 +1,108 @@ +use std::any::TypeId; + +use bevy::{prelude::*, utils::hashbrown::HashSet}; +use blenvy::{AddToGameWorld, BlenvyPlugin, BluePrintBundle, BlueprintInfo, DynamicBlueprintInstance, GameWorldTag, HideUntilReady, SpawnBlueprint}; +use rand::Rng; + +mod core; +use crate::core::*; + +mod game; +use game::*; + +mod component_examples; +use component_examples::*; + +fn main() { + App::new() + .add_plugins(( + DefaultPlugins.set(AssetPlugin::default()), + BlenvyPlugin { + save_component_filter: SceneFilter::Allowlist(HashSet::from([ + TypeId::of::(), + TypeId::of::(), + //TypeId::of::(), + TypeId::of::(), + TypeId::of::(), + TypeId::of::(), + //TypeId::of::(), + //TypeId::of::(), + TypeId::of::(), + //TypeId::of::(), + //TypeId::of::(), + TypeId::of::(), + //TypeId::of::(), + //TypeId::of::(), + ])), + ..Default::default() + }, + // our custom plugins + CorePlugin, // reusable plugins + GamePlugin, // specific to our game + ComponentsExamplesPlugin, // Showcases different type of components /structs + )) + + .add_systems(Startup, setup_game) + .add_systems(Update, (spawn_blueprint_instance, save_game, load_game)) + + .run(); +} + +// this is how you setup & spawn a level from a blueprint +fn setup_game( + mut commands: Commands, +) { + + // here we spawn our game world/level, which is also a blueprint ! + commands.spawn(( + BlueprintInfo::from_path("levels/World.glb"), // all we need is a Blueprint info... + SpawnBlueprint, // and spawnblueprint to tell blenvy to spawn the blueprint now + HideUntilReady, // only reveal the level once it is ready + GameWorldTag, + )); +} + +// you can also spawn blueprint instances at runtime +fn spawn_blueprint_instance( + keycode: Res>, + mut commands: Commands, +) { + if keycode.just_pressed(KeyCode::KeyT) { + // random position + let mut rng = rand::thread_rng(); + let range = 5.5; + let x: f32 = rng.gen_range(-range..range); + let y: f32 = rng.gen_range(-range..range); + + // random name + let name_index: u64 = rng.gen(); + + commands + .spawn(( + BlueprintInfo::from_path("blueprints/test.glb"), + SpawnBlueprint, + DynamicBlueprintInstance, + bevy::prelude::Name::from(format!("test{}", name_index)), + HideUntilReady, + AddToGameWorld, + TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), + )); + } +} + +fn save_game( + keycode: Res>, + +) { + if keycode.just_pressed(KeyCode::KeyS) { + + } +} + +fn load_game( + keycode: Res>, +) { + if keycode.just_pressed(KeyCode::KeyL) { + + } +} diff --git a/examples/common/Cargo.toml b/examples/common/Cargo.toml deleted file mode 100644 index f50c3a4..0000000 --- a/examples/common/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "bevy_gltf_worlflow_examples_common" -version = "0.1.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[features] -blueprints = ["dep:bevy_gltf_blueprints"] -physics_rapier = ["dep:bevy_rapier3d"] -physics_xpbd = ["dep:bevy_xpbd_3d"] -default = ["blueprints", "physics_rapier"] - - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true } -bevy_rapier3d = { version = "0.27", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"], optional = true } -bevy_xpbd_3d = { version = "0.5", optional = true } -bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] } -#bevy_editor_pls = { version = "0.8" } -rand = "0.8.5" diff --git a/examples/common/src/assets/assets_core.rs b/examples/common/src/assets/assets_core.rs deleted file mode 100644 index 29b577a..0000000 --- a/examples/common/src/assets/assets_core.rs +++ /dev/null @@ -1,5 +0,0 @@ -use bevy::prelude::*; -use bevy_asset_loader::prelude::*; - -#[derive(AssetCollection, Resource)] -pub struct CoreAssets {} diff --git a/examples/common/src/assets/assets_game.rs b/examples/common/src/assets/assets_game.rs deleted file mode 100644 index 5bb5986..0000000 --- a/examples/common/src/assets/assets_game.rs +++ /dev/null @@ -1,24 +0,0 @@ -use bevy::gltf::Gltf; -use bevy::prelude::*; -use bevy::utils::HashMap; -use bevy_asset_loader::prelude::*; - -#[derive(AssetCollection, Resource)] -pub struct GameAssets { - #[asset(key = "world", optional)] - pub world: Option>, - - #[asset(key = "world_dynamic", optional)] - pub world_dynamic: Option>, - - #[asset(key = "level1", optional)] - pub level1: Option>, - #[asset(key = "level2", optional)] - pub level2: Option>, - - #[asset(key = "models", collection(typed, mapped), optional)] - pub models: Option>>, - - #[asset(key = "materials", collection(typed, mapped), optional)] - pub materials: Option>>, -} diff --git a/examples/common/src/assets/mod.rs b/examples/common/src/assets/mod.rs deleted file mode 100644 index 7034ca6..0000000 --- a/examples/common/src/assets/mod.rs +++ /dev/null @@ -1,35 +0,0 @@ -pub mod assets_core; -pub use assets_core::*; - -pub mod assets_game; -pub use assets_game::*; - -use bevy::prelude::*; -use bevy_asset_loader::prelude::*; - -use crate::state::AppState; - -pub struct AssetsPlugin; -impl Plugin for AssetsPlugin { - fn build(&self, app: &mut App) { - app - // load core assets (ie assets needed in the main menu, and everywhere else before loading more assets in game) - .add_loading_state( - LoadingState::new(AppState::CoreLoading) - .continue_to_state(AppState::MenuRunning) - .with_dynamic_assets_file::( - "assets_core.assets.ron", - ) - .load_collection::(), - ) - // load game assets - .add_loading_state( - LoadingState::new(AppState::AppLoading) - .continue_to_state(AppState::AppRunning) - .with_dynamic_assets_file::( - "assets_game.assets.ron", - ) - .load_collection::(), - ); - } -} diff --git a/examples/common/src/core/mod.rs b/examples/common/src/core/mod.rs deleted file mode 100644 index 4d8dde2..0000000 --- a/examples/common/src/core/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub mod camera; -pub use camera::*; - -//pub mod relationships; -//pub use relationships::*; - -use bevy::prelude::*; - -pub struct CorePlugin; -impl Plugin for CorePlugin { - fn build(&self, app: &mut App) { - app.add_plugins(CameraPlugin); - } -} diff --git a/examples/common/src/game/mod.rs b/examples/common/src/game/mod.rs deleted file mode 100644 index 50dab57..0000000 --- a/examples/common/src/game/mod.rs +++ /dev/null @@ -1,36 +0,0 @@ -/*pub mod in_game; -pub use in_game::*; - -pub mod in_main_menu; -pub use in_main_menu::*;*/ - -pub mod player; -pub use player::*; - -pub mod picking; -pub use picking::*; - -/* -use crate::{ - state::{AppState, GameState}, -};*/ -use bevy::prelude::*; - -pub struct GamePlugin; -impl Plugin for GamePlugin { - fn build(&self, app: &mut App) { - app.add_plugins(( - PlayerPlugin, - PickingPlugin - )) - /* .register_type::() - .register_type::() - .register_type::() - - .add_systems(OnEnter(AppState::MenuRunning), setup_main_menu) - .add_systems(OnExit(AppState::MenuRunning), teardown_main_menu) - .add_systems(Update, main_menu.run_if(in_state(AppState::MenuRunning))) - .add_systems(OnEnter(AppState::AppRunning), setup_game);*/ - ; - } -} diff --git a/examples/common/src/lib.rs b/examples/common/src/lib.rs deleted file mode 100644 index 5fc48bc..0000000 --- a/examples/common/src/lib.rs +++ /dev/null @@ -1,27 +0,0 @@ -pub mod state; -pub use state::*; - -pub mod assets; -use assets::*; - -pub mod core; -pub use core::*; - -pub mod game; -pub use game::*; - -use bevy::prelude::*; -//use bevy_editor_pls::prelude::*; - -pub struct CommonPlugin; -impl Plugin for CommonPlugin { - fn build(&self, app: &mut App) { - app.add_plugins(( - StatePlugin, - AssetsPlugin, - CorePlugin, - GamePlugin, - //EditorPlugin::default(), - )); - } -} diff --git a/examples/common_rapier/Cargo.toml b/examples/common_rapier/Cargo.toml deleted file mode 100644 index 4db3cce..0000000 --- a/examples/common_rapier/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "bevy_gltf_worlflow_examples_common_rapier" -version = "0.1.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[features] -blueprints = ["dep:bevy_gltf_blueprints"] -default = ["blueprints"] - - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_worlflow_examples_common = { path = "../common" } -bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true } -bevy_rapier3d = { version = "0.27", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] } -#bevy_editor_pls = { version = "0.8" } -rand = "0.8.5" diff --git a/examples/common_rapier/src/lib.rs b/examples/common_rapier/src/lib.rs deleted file mode 100644 index 0df818d..0000000 --- a/examples/common_rapier/src/lib.rs +++ /dev/null @@ -1,13 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin as CommonBasePlugin; - -pub use bevy_gltf_worlflow_examples_common::*; - -mod physics; - -pub struct CommonPlugin; -impl Plugin for CommonPlugin { - fn build(&self, app: &mut App) { - app.add_plugins((physics::plugin, CommonBasePlugin)); - } -} diff --git a/examples/common_xpbd/Cargo.toml b/examples/common_xpbd/Cargo.toml deleted file mode 100644 index d2921f1..0000000 --- a/examples/common_xpbd/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "bevy_gltf_worlflow_examples_common_xpbd" -version = "0.1.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[features] -blueprints = ["dep:bevy_gltf_blueprints"] -default = ["blueprints"] - - -[dependencies] -bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_worlflow_examples_common = { path = "../common" } -bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints", optional = true } -bevy_xpbd_3d = { version = "0.5" } -bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] } -#bevy_editor_pls = { version = "0.8" } -rand = "0.8.5" diff --git a/examples/common_xpbd/src/lib.rs b/examples/common_xpbd/src/lib.rs deleted file mode 100644 index 0df818d..0000000 --- a/examples/common_xpbd/src/lib.rs +++ /dev/null @@ -1,13 +0,0 @@ -use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common::CommonPlugin as CommonBasePlugin; - -pub use bevy_gltf_worlflow_examples_common::*; - -mod physics; - -pub struct CommonPlugin; -impl Plugin for CommonPlugin { - fn build(&self, app: &mut App) { - app.add_plugins((physics::plugin, CommonBasePlugin)); - } -} diff --git a/testing/bevy_example/Cargo.toml b/testing/bevy_example/Cargo.toml index 3aacf28..90b258c 100644 --- a/testing/bevy_example/Cargo.toml +++ b/testing/bevy_example/Cargo.toml @@ -6,11 +6,7 @@ license = "MIT OR Apache-2.0" [dependencies] bevy = { version = "0.14", features = ["dynamic_linking"] } -bevy_gltf_blueprints = { path = "../../crates/bevy_gltf_blueprints" } -bevy_registry_export = { path = "../../crates/bevy_registry_export" } -bevy_gltf_worlflow_examples_common_rapier = { path = "../../examples/common_rapier" } - -bevy_rapier3d = { version = "0.27.0", features = ["serde-serialize", "debug-render-3d", "enhanced-determinism"] } -bevy_asset_loader = { version = "0.21", features = ["standard_dynamic_assets"] } +blenvy = { path = "../../crates/blenvy" } #bevy_editor_pls = { version = "0.8" } rand = "0.8.5" +json-writer ="0.3" \ No newline at end of file diff --git a/testing/bevy_example/assets/testing.blend b/testing/bevy_example/art/testing.blend similarity index 59% rename from testing/bevy_example/assets/testing.blend rename to testing/bevy_example/art/testing.blend index 5af50a4..416bf39 100644 Binary files a/testing/bevy_example/assets/testing.blend and b/testing/bevy_example/art/testing.blend differ diff --git a/testing/bevy_example/art/testing_library.blend b/testing/bevy_example/art/testing_library.blend new file mode 100644 index 0000000..661cf44 Binary files /dev/null and b/testing/bevy_example/art/testing_library.blend differ diff --git a/testing/bevy_example/art/testing_simple.blend b/testing/bevy_example/art/testing_simple.blend new file mode 100644 index 0000000..99d8e72 Binary files /dev/null and b/testing/bevy_example/art/testing_simple.blend differ diff --git a/testing/bevy_example/assets/audio/assets_sounds_breakout_collision.ogg b/testing/bevy_example/assets/audio/assets_sounds_breakout_collision.ogg new file mode 100644 index 0000000..0211d70 Binary files /dev/null and b/testing/bevy_example/assets/audio/assets_sounds_breakout_collision.ogg differ diff --git a/tools/bevy_components/components/__init__.py b/testing/bevy_example/assets/audio/fake.mp3 similarity index 100% rename from tools/bevy_components/components/__init__.py rename to testing/bevy_example/assets/audio/fake.mp3 diff --git a/testing/bevy_example/assets/registry.json b/testing/bevy_example/assets/registry.json index 33887c3..5a5ec38 100644 --- a/testing/bevy_example/assets/registry.json +++ b/testing/bevy_example/assets/registry.json @@ -1,9 +1,20 @@ { "$defs": { + "()": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "()", + "prefixItems": [], + "short_name": "()", + "type": "array", + "typeInfo": "Tuple" + }, "(f32, f32)": { "isComponent": false, "isResource": false, "items": false, + "long_name": "(f32, f32)", "prefixItems": [ { "type": { @@ -17,31 +28,43 @@ } ], "short_name": "(f32, f32)", - "title": "(f32, f32)", "type": "array", "typeInfo": "Tuple" }, - "alloc::borrow::Cow": { + "(u8, u8)": { "isComponent": false, "isResource": false, - "short_name": "Cow", - "title": "alloc::borrow::Cow", - "type": "object", - "typeInfo": "Value" + "items": false, + "long_name": "(u8, u8)", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u8" + } + }, + { + "type": { + "$ref": "#/$defs/u8" + } + } + ], + "short_name": "(u8, u8)", + "type": "array", + "typeInfo": "Tuple" }, "alloc::borrow::Cow": { "isComponent": false, "isResource": false, + "long_name": "alloc::borrow::Cow", "short_name": "Cow", - "title": "alloc::borrow::Cow", "type": "object", "typeInfo": "Value" }, "alloc::string::String": { "isComponent": false, "isResource": false, + "long_name": "alloc::string::String", "short_name": "String", - "title": "alloc::string::String", "type": "string", "typeInfo": "Value" }, @@ -53,8 +76,8 @@ "$ref": "#/$defs/(f32, f32)" } }, + "long_name": "alloc::vec::Vec<(f32, f32)>", "short_name": "Vec<(f32, f32)>", - "title": "alloc::vec::Vec<(f32, f32)>", "type": "array", "typeInfo": "List" }, @@ -66,8 +89,8 @@ "$ref": "#/$defs/alloc::string::String" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -79,8 +102,34 @@ "$ref": "#/$defs/bevy_animation::VariableCurve" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_animation::transition::AnimationTransition" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, @@ -92,8 +141,8 @@ "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -105,21 +154,47 @@ "$ref": "#/$defs/bevy_example::test_components::TupleVec3" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, - "alloc::vec::Vec": { + "alloc::vec::Vec": { "isComponent": false, "isResource": false, "items": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_math::rects::urect::URect" } }, - "short_name": "Vec", - "title": "alloc::vec::Vec", + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_pbr::light::Cascade" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_text::glyph_brush::PositionedGlyph" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, @@ -131,8 +206,60 @@ "$ref": "#/$defs/bevy_text::text::TextSection" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::RepeatedGridTrack" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::animation::AnimationInfo" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/blenvy::blueprints::assets::BlueprintAsset" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, @@ -144,8 +271,8 @@ "$ref": "#/$defs/f32" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -157,8 +284,8 @@ "$ref": "#/$defs/glam::Quat" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", "type": "array", "typeInfo": "List" }, @@ -170,8 +297,34 @@ "$ref": "#/$defs/glam::Vec3" } }, + "long_name": "alloc::vec::Vec", "short_name": "Vec", - "title": "alloc::vec::Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u16" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", + "type": "array", + "typeInfo": "List" + }, + "alloc::vec::Vec": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "alloc::vec::Vec", + "short_name": "Vec", "type": "array", "typeInfo": "List" }, @@ -179,30 +332,24 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::AnimationClip", "properties": { "curves": { "type": { - "$ref": "#/$defs/alloc::vec::Vec>" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>" } }, "duration": { "type": { "$ref": "#/$defs/f32" } - }, - "paths": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" - } } }, "required": [ "curves", - "paths", "duration" ], "short_name": "AnimationClip", - "title": "bevy_animation::AnimationClip", "type": "object", "typeInfo": "Struct" }, @@ -210,46 +357,89 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_animation::AnimationPlayer", "properties": { - "animation": { + "active_animations": { "type": { - "$ref": "#/$defs/bevy_animation::PlayingAnimation" + "$ref": "#/$defs/std::collections::BTreeMap" } }, - "paused": { + "blend_weights": { "type": { - "$ref": "#/$defs/bool" + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" } } }, "required": [ - "paused", - "animation" + "active_animations", + "blend_weights" ], "short_name": "AnimationPlayer", - "title": "bevy_animation::AnimationPlayer", "type": "object", "typeInfo": "Struct" }, + "bevy_animation::AnimationTarget": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_animation::AnimationTarget", + "properties": { + "id": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "player": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "id", + "player" + ], + "short_name": "AnimationTarget", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::AnimationTargetId": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_animation::AnimationTargetId", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + ], + "short_name": "AnimationTargetId", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_animation::Interpolation": { "isComponent": false, "isResource": false, + "long_name": "bevy_animation::Interpolation", "oneOf": [ "Linear", "Step", "CubicSpline" ], "short_name": "Interpolation", - "title": "bevy_animation::Interpolation", "type": "string", "typeInfo": "Enum" }, "bevy_animation::Keyframes": { "isComponent": false, "isResource": false, + "long_name": "bevy_animation::Keyframes", "oneOf": [ { "items": false, + "long_name": "Rotation", "prefixItems": [ { "type": { @@ -258,12 +448,12 @@ } ], "short_name": "Rotation", - "title": "Rotation", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Translation", "prefixItems": [ { "type": { @@ -272,12 +462,12 @@ } ], "short_name": "Translation", - "title": "Translation", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Scale", "prefixItems": [ { "type": { @@ -286,12 +476,12 @@ } ], "short_name": "Scale", - "title": "Scale", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weights", "prefixItems": [ { "type": { @@ -300,13 +490,11 @@ } ], "short_name": "Weights", - "title": "Weights", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Keyframes", - "title": "bevy_animation::Keyframes", "type": "object", "typeInfo": "Enum" }, @@ -314,6 +502,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_animation::VariableCurve", "properties": { "interpolation": { "type": { @@ -337,16 +526,122 @@ "interpolation" ], "short_name": "VariableCurve", - "title": "bevy_animation::VariableCurve", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::graph::AnimationGraph": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::graph::AnimationGraph", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/petgraph::graph::DiGraph" + } + }, + "root": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + }, + "required": [ + "graph", + "root" + ], + "short_name": "AnimationGraph", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::transition::AnimationTransition": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransition", + "properties": { + "animation": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "current_weight": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "weight_decline_per_sec": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "current_weight", + "weight_decline_per_sec", + "animation" + ], + "short_name": "AnimationTransition", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_animation::transition::AnimationTransitions": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_animation::transition::AnimationTransitions", + "properties": { + "main_animation": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "transitions": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "transitions" + ], + "short_name": "AnimationTransitions", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_asset::assets::AssetIndex": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::assets::AssetIndex", + "properties": { + "generation": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "index": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "generation", + "index" + ], + "short_name": "AssetIndex", "type": "object", "typeInfo": "Struct" }, "bevy_asset::handle::Handle<()>": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle<()>", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -355,12 +650,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -369,22 +664,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle<()>", - "title": "bevy_asset::handle::Handle<()>", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -393,12 +688,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -407,22 +702,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, - "bevy_asset::handle::Handle": { + "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -431,12 +726,50 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + } + ], + "short_name": "Weak", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Handle", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::handle::Handle": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_asset::handle::Handle", + "oneOf": [ + { + "items": false, + "long_name": "Strong", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/std::sync::Arc" + } + } + ], + "short_name": "Strong", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -445,22 +778,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -469,12 +802,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -483,60 +816,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::handle::Handle": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/std::sync::Arc" - } - } - ], - "short_name": "Strong", - "title": "Strong", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" - } - } - ], - "short_name": "Weak", - "title": "Weak", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -545,12 +840,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -559,22 +854,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -583,12 +878,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -597,22 +892,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -621,12 +916,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -635,22 +930,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -659,12 +954,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -673,22 +968,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -697,12 +992,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -711,22 +1006,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -735,12 +1030,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -749,22 +1044,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -773,12 +1068,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -787,22 +1082,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle>": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle>", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -811,12 +1106,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -825,22 +1120,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle>", - "title": "bevy_asset::handle::Handle>", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -849,12 +1144,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -863,60 +1158,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::handle::Handle": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/std::sync::Arc" - } - } - ], - "short_name": "Strong", - "title": "Strong", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::id::AssetId" - } - } - ], - "short_name": "Weak", - "title": "Weak", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -925,12 +1182,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -939,22 +1196,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -963,12 +1220,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -977,22 +1234,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1001,12 +1258,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1015,22 +1272,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1039,12 +1296,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1053,22 +1310,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1077,12 +1334,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1091,22 +1348,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1115,12 +1372,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1129,22 +1386,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1153,12 +1410,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1167,22 +1424,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1191,12 +1448,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1205,22 +1462,22 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::handle::Handle": { "isComponent": true, "isResource": false, + "long_name": "bevy_asset::handle::Handle", "oneOf": [ { "items": false, + "long_name": "Strong", "prefixItems": [ { "type": { @@ -1229,12 +1486,12 @@ } ], "short_name": "Strong", - "title": "Strong", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Weak", "prefixItems": [ { "type": { @@ -1243,25 +1500,25 @@ } ], "short_name": "Weak", - "title": "Weak", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Handle", - "title": "bevy_asset::handle::Handle", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId<()>": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId<()>", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1271,17 +1528,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1289,25 +1546,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId<()>", - "title": "bevy_asset::id::AssetId<()>", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1317,17 +1574,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1335,25 +1592,71 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_asset::id::AssetId": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_asset::id::AssetId", + "oneOf": [ + { + "additionalProperties": false, + "long_name": "Index", + "properties": { + "index": { + "long_name": "index", + "type": { + "$ref": "#/$defs/bevy_asset::assets::AssetIndex" + } + } + }, + "required": [ + "index" + ], + "short_name": "Index", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "Uuid", + "properties": { + "uuid": { + "long_name": "uuid", + "type": { + "$ref": "#/$defs/uuid::Uuid" + } + } + }, + "required": [ + "uuid" + ], + "short_name": "Uuid", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1363,17 +1666,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1381,25 +1684,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1409,17 +1712,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1427,71 +1730,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::id::AssetId": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "index": { - "title": "index", - "type": { - "$ref": "#/$defs/bevy_asset::assets::AssetIndex" - } - } - }, - "required": [ - "index" - ], - "short_name": "Index", - "title": "Index", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "uuid": { - "title": "uuid", - "type": { - "$ref": "#/$defs/bevy_utils::Uuid" - } - } - }, - "required": [ - "uuid" - ], - "short_name": "Uuid", - "title": "Uuid", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1501,17 +1758,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1519,25 +1776,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1547,17 +1804,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1565,25 +1822,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1593,17 +1850,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1611,25 +1868,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1639,17 +1896,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1657,25 +1914,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1685,17 +1942,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1703,25 +1960,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1731,17 +1988,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1749,25 +2006,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1777,17 +2034,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1795,25 +2052,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId>": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId>", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1823,17 +2080,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1841,25 +2098,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId>", - "title": "bevy_asset::id::AssetId>", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1869,17 +2126,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1887,71 +2144,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_asset::id::AssetId": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "index": { - "title": "index", - "type": { - "$ref": "#/$defs/bevy_asset::assets::AssetIndex" - } - } - }, - "required": [ - "index" - ], - "short_name": "Index", - "title": "Index", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "uuid": { - "title": "uuid", - "type": { - "$ref": "#/$defs/bevy_utils::Uuid" - } - } - }, - "required": [ - "uuid" - ], - "short_name": "Uuid", - "title": "Uuid", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -1961,17 +2172,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -1979,25 +2190,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2007,17 +2218,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2025,25 +2236,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2053,17 +2264,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2071,25 +2282,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2099,17 +2310,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2117,25 +2328,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2145,17 +2356,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2163,25 +2374,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2191,17 +2402,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2209,25 +2420,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2237,17 +2448,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2255,25 +2466,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2283,17 +2494,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2301,25 +2512,25 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, "bevy_asset::id::AssetId": { "isComponent": false, "isResource": false, + "long_name": "bevy_asset::id::AssetId", "oneOf": [ { "additionalProperties": false, + "long_name": "Index", "properties": { "index": { - "title": "index", + "long_name": "index", "type": { "$ref": "#/$defs/bevy_asset::assets::AssetIndex" } @@ -2329,17 +2540,17 @@ "index" ], "short_name": "Index", - "title": "Index", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Uuid", "properties": { "uuid": { - "title": "uuid", + "long_name": "uuid", "type": { - "$ref": "#/$defs/bevy_utils::Uuid" + "$ref": "#/$defs/uuid::Uuid" } } }, @@ -2347,21 +2558,19 @@ "uuid" ], "short_name": "Uuid", - "title": "Uuid", "type": "object", "typeInfo": "Struct" } ], "short_name": "AssetId", - "title": "bevy_asset::id::AssetId", "type": "object", "typeInfo": "Enum" }, - "bevy_asset::path::AssetPath<'static>": { + "bevy_asset::path::AssetPath": { "isComponent": false, "isResource": false, - "short_name": "AssetPath<'static>", - "title": "bevy_asset::path::AssetPath<'static>", + "long_name": "bevy_asset::path::AssetPath", + "short_name": "AssetPath", "type": "object", "typeInfo": "Value" }, @@ -2369,6 +2578,7 @@ "isComponent": false, "isResource": true, "items": false, + "long_name": "bevy_audio::audio::DefaultSpatialScale", "prefixItems": [ { "type": { @@ -2377,7 +2587,6 @@ } ], "short_name": "DefaultSpatialScale", - "title": "bevy_audio::audio::DefaultSpatialScale", "type": "array", "typeInfo": "TupleStruct" }, @@ -2385,6 +2594,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_audio::audio::GlobalVolume", "properties": { "volume": { "type": { @@ -2396,13 +2606,13 @@ "volume" ], "short_name": "GlobalVolume", - "title": "bevy_audio::audio::GlobalVolume", "type": "object", "typeInfo": "Struct" }, "bevy_audio::audio::PlaybackMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_audio::audio::PlaybackMode", "oneOf": [ "Once", "Loop", @@ -2410,7 +2620,6 @@ "Remove" ], "short_name": "PlaybackMode", - "title": "bevy_audio::audio::PlaybackMode", "type": "string", "typeInfo": "Enum" }, @@ -2418,6 +2627,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_audio::audio::PlaybackSettings", "properties": { "mode": { "type": { @@ -2458,7 +2668,6 @@ "spatial" ], "short_name": "PlaybackSettings", - "title": "bevy_audio::audio::PlaybackSettings", "type": "object", "typeInfo": "Struct" }, @@ -2466,6 +2675,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_audio::audio::SpatialListener", "properties": { "left_ear_offset": { "type": { @@ -2483,14 +2693,30 @@ "right_ear_offset" ], "short_name": "SpatialListener", - "title": "bevy_audio::audio::SpatialListener", "type": "object", "typeInfo": "Struct" }, + "bevy_audio::audio::SpatialScale": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_audio::audio::SpatialScale", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + ], + "short_name": "SpatialScale", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_audio::audio::Volume": { "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_audio::audio::Volume", "prefixItems": [ { "type": { @@ -2499,14 +2725,534 @@ } ], "short_name": "Volume", - "title": "bevy_audio::audio::Volume", "type": "array", "typeInfo": "TupleStruct" }, + "bevy_color::color::Color": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::color::Color", + "oneOf": [ + { + "items": false, + "long_name": "Srgba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::srgba::Srgba" + } + } + ], + "short_name": "Srgba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "LinearRgba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::linear_rgba::LinearRgba" + } + } + ], + "short_name": "LinearRgba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hsla", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hsla::Hsla" + } + } + ], + "short_name": "Hsla", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hsva", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hsva::Hsva" + } + } + ], + "short_name": "Hsva", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Hwba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::hwba::Hwba" + } + } + ], + "short_name": "Hwba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Laba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::laba::Laba" + } + } + ], + "short_name": "Laba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Lcha", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::lcha::Lcha" + } + } + ], + "short_name": "Lcha", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Oklaba", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::oklaba::Oklaba" + } + } + ], + "short_name": "Oklaba", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Oklcha", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::oklcha::Oklcha" + } + } + ], + "short_name": "Oklcha", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Xyza", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::xyza::Xyza" + } + } + ], + "short_name": "Xyza", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Color", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_color::hsla::Hsla": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hsla::Hsla", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "saturation", + "lightness", + "alpha" + ], + "short_name": "Hsla", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::hsva::Hsva": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hsva::Hsva", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "saturation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "saturation", + "value", + "alpha" + ], + "short_name": "Hsva", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::hwba::Hwba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::hwba::Hwba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blackness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "whiteness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "hue", + "whiteness", + "blackness", + "alpha" + ], + "short_name": "Hwba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::laba::Laba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::laba::Laba", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "a", + "b", + "alpha" + ], + "short_name": "Laba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::lcha::Lcha": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::lcha::Lcha", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "chroma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "chroma", + "hue", + "alpha" + ], + "short_name": "Lcha", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::linear_rgba::LinearRgba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::linear_rgba::LinearRgba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "green": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "red": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "short_name": "LinearRgba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::oklaba::Oklaba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::oklaba::Oklaba", + "properties": { + "a": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "b": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "a", + "b", + "alpha" + ], + "short_name": "Oklaba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::oklcha::Oklcha": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::oklcha::Oklcha", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "chroma": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "lightness": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "lightness", + "chroma", + "hue", + "alpha" + ], + "short_name": "Oklcha", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::srgba::Srgba": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::srgba::Srgba", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "blue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "green": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "red": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "short_name": "Srgba", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_color::xyza::Xyza": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_color::xyza::Xyza", + "properties": { + "alpha": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "x": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "y": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "z": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "x", + "y", + "z", + "alpha" + ], + "short_name": "Xyza", + "type": "object", + "typeInfo": "Struct" + }, "bevy_core::name::Name": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core::name::Name", "properties": { "hash": { "type": { @@ -2524,19 +3270,18 @@ "name" ], "short_name": "Name", - "title": "bevy_core::name::Name", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::bloom::settings::BloomCompositeMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomCompositeMode", "oneOf": [ "EnergyConserving", "Additive" ], "short_name": "BloomCompositeMode", - "title": "bevy_core_pipeline::bloom::settings::BloomCompositeMode", "type": "string", "typeInfo": "Enum" }, @@ -2544,6 +3289,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomPrefilterSettings", "properties": { "threshold": { "type": { @@ -2561,7 +3307,6 @@ "threshold_softness" ], "short_name": "BloomPrefilterSettings", - "title": "bevy_core_pipeline::bloom::settings::BloomPrefilterSettings", "type": "object", "typeInfo": "Struct" }, @@ -2569,6 +3314,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::bloom::settings::BloomSettings", "properties": { "composite_mode": { "type": { @@ -2610,7 +3356,6 @@ "composite_mode" ], "short_name": "BloomSettings", - "title": "bevy_core_pipeline::bloom::settings::BloomSettings", "type": "object", "typeInfo": "Struct" }, @@ -2618,6 +3363,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings", "properties": { "denoise": { "type": { @@ -2641,7 +3387,6 @@ "denoise" ], "short_name": "ContrastAdaptiveSharpeningSettings", - "title": "bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings", "type": "object", "typeInfo": "Struct" }, @@ -2649,10 +3394,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", "properties": {}, "required": [], "short_name": "Camera2d", - "title": "bevy_core_pipeline::core_2d::camera_2d::Camera2d", "type": "object", "typeInfo": "Struct" }, @@ -2660,6 +3405,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3d", "properties": { "depth_load_op": { "type": { @@ -2689,16 +3435,17 @@ "screen_space_specular_transmission_quality" ], "short_name": "Camera3d", - "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3d", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp": { "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp", "oneOf": [ { "items": false, + "long_name": "Clear", "prefixItems": [ { "type": { @@ -2707,16 +3454,14 @@ } ], "short_name": "Clear", - "title": "Clear", "type": "array", "typeInfo": "Tuple" }, { - "title": "Load" + "long_name": "Load" } ], "short_name": "Camera3dDepthLoadOp", - "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthLoadOp", "type": "object", "typeInfo": "Enum" }, @@ -2724,6 +3469,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", "prefixItems": [ { "type": { @@ -2732,13 +3478,13 @@ } ], "short_name": "Camera3dDepthTextureUsage", - "title": "bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage", "type": "array", "typeInfo": "TupleStruct" }, "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality": { "isComponent": false, "isResource": true, + "long_name": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", "oneOf": [ "Low", "Medium", @@ -2746,7 +3492,6 @@ "Ultra" ], "short_name": "ScreenSpaceTransmissionQuality", - "title": "bevy_core_pipeline::core_3d::camera_3d::ScreenSpaceTransmissionQuality", "type": "string", "typeInfo": "Enum" }, @@ -2754,6 +3499,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Fxaa", "properties": { "edge_threshold": { "type": { @@ -2777,18 +3523,32 @@ "edge_threshold_min" ], "short_name": "Fxaa", - "title": "bevy_core_pipeline::fxaa::Fxaa", "type": "object", "typeInfo": "Struct" }, + "bevy_core_pipeline::fxaa::Sensitivity": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::fxaa::Sensitivity", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra", + "Extreme" + ], + "short_name": "Sensitivity", + "type": "string", + "typeInfo": "Enum" + }, "bevy_core_pipeline::prepass::DeferredPrepass": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::DeferredPrepass", "properties": {}, "required": [], "short_name": "DeferredPrepass", - "title": "bevy_core_pipeline::prepass::DeferredPrepass", "type": "object", "typeInfo": "Struct" }, @@ -2796,10 +3556,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::DepthPrepass", "properties": {}, "required": [], "short_name": "DepthPrepass", - "title": "bevy_core_pipeline::prepass::DepthPrepass", "type": "object", "typeInfo": "Struct" }, @@ -2807,10 +3567,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::MotionVectorPrepass", "properties": {}, "required": [], "short_name": "MotionVectorPrepass", - "title": "bevy_core_pipeline::prepass::MotionVectorPrepass", "type": "object", "typeInfo": "Struct" }, @@ -2818,28 +3578,62 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_core_pipeline::prepass::NormalPrepass", "properties": {}, "required": [], "short_name": "NormalPrepass", - "title": "bevy_core_pipeline::prepass::NormalPrepass", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_core_pipeline::smaa::SmaaPreset": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaPreset", + "oneOf": [ + "Low", + "Medium", + "High", + "Ultra" + ], + "short_name": "SmaaPreset", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_core_pipeline::smaa::SmaaSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_core_pipeline::smaa::SmaaSettings", + "properties": { + "preset": { + "type": { + "$ref": "#/$defs/bevy_core_pipeline::smaa::SmaaPreset" + } + } + }, + "required": [ + "preset" + ], + "short_name": "SmaaSettings", "type": "object", "typeInfo": "Struct" }, "bevy_core_pipeline::tonemapping::DebandDither": { "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::tonemapping::DebandDither", "oneOf": [ "Disabled", "Enabled" ], "short_name": "DebandDither", - "title": "bevy_core_pipeline::tonemapping::DebandDither", "type": "string", "typeInfo": "Enum" }, "bevy_core_pipeline::tonemapping::Tonemapping": { "isComponent": true, "isResource": false, + "long_name": "bevy_core_pipeline::tonemapping::Tonemapping", "oneOf": [ "None", "Reinhard", @@ -2851,99 +3645,85 @@ "BlenderFilmic" ], "short_name": "Tonemapping", - "title": "bevy_core_pipeline::tonemapping::Tonemapping", "type": "string", "typeInfo": "Enum" }, - "bevy_ecs::component::ComponentId": { - "isComponent": false, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/usize" - } - } - ], - "short_name": "ComponentId", - "title": "bevy_ecs::component::ComponentId", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_ecs::component::ComponentTicks": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "added": { - "type": { - "$ref": "#/$defs/bevy_ecs::component::Tick" - } - }, - "changed": { - "type": { - "$ref": "#/$defs/bevy_ecs::component::Tick" - } - } - }, - "required": [ - "added", - "changed" - ], - "short_name": "ComponentTicks", - "title": "bevy_ecs::component::ComponentTicks", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_ecs::component::Tick": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "tick": { - "type": { - "$ref": "#/$defs/u32" - } - } - }, - "required": [ - "tick" - ], - "short_name": "Tick", - "title": "bevy_ecs::component::Tick", - "type": "object", - "typeInfo": "Struct" - }, "bevy_ecs::entity::Entity": { "isComponent": false, "isResource": false, + "long_name": "bevy_ecs::entity::Entity", "short_name": "Entity", - "title": "bevy_ecs::entity::Entity", "type": "object", "typeInfo": "Value" }, - "bevy_egui::EguiSettings": { - "additionalProperties": false, - "isComponent": false, + "bevy_example::dupe_components::EnumTest": { + "isComponent": true, "isResource": false, - "properties": { - "default_open_url_target": { - "type": { - "$ref": "#/$defs/core::option::Option" - } - }, - "scale_factor": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "scale_factor" + "long_name": "bevy_example::dupe_components::EnumTest", + "oneOf": [ + "Metal", + "Wood", + "Rock", + "Cloth", + "Squishy", + "None" ], - "short_name": "EguiSettings", - "title": "bevy_egui::EguiSettings", + "short_name": "EnumTest", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_example::game::animation::Marker1": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::game::animation::Marker1", + "properties": {}, + "required": [], + "short_name": "Marker1", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::game::animation::Marker2": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::game::animation::Marker2", + "properties": {}, + "required": [], + "short_name": "Marker2", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::game::animation::Marker3": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::game::animation::Marker3", + "properties": {}, + "required": [], + "short_name": "Marker3", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::game::animation::MarkerAllFoxes": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::game::animation::MarkerAllFoxes", + "properties": {}, + "required": [], + "short_name": "MarkerAllFoxes", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::game::animation::MarkerSpecificFox": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::game::animation::MarkerSpecificFox", + "properties": {}, + "required": [], + "short_name": "MarkerSpecificFox", "type": "object", "typeInfo": "Struct" }, @@ -2951,10 +3731,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut", "properties": {}, "required": [], "short_name": "AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut", - "title": "bevy_example::test_components::AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut", "type": "object", "typeInfo": "Struct" }, @@ -2962,6 +3742,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::BasicTest", "properties": { "a": { "type": { @@ -2985,16 +3766,80 @@ "c" ], "short_name": "BasicTest", - "title": "bevy_example::test_components::BasicTest", "type": "object", "typeInfo": "Struct" }, + "bevy_example::test_components::ComponentWithFieldsOfIdenticalType": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::ComponentWithFieldsOfIdenticalType", + "properties": { + "first": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "fourth": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "second": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "third": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "first", + "second", + "third", + "fourth" + ], + "short_name": "ComponentWithFieldsOfIdenticalType", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::ComponentWithFieldsOfIdenticalType2": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_example::test_components::ComponentWithFieldsOfIdenticalType2", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + }, + { + "type": { + "$ref": "#/$defs/f32" + } + }, + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "ComponentWithFieldsOfIdenticalType2", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_example::test_components::EnumComplex": { "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::EnumComplex", "oneOf": [ { "items": false, + "long_name": "Float", "prefixItems": [ { "type": { @@ -3003,12 +3848,12 @@ } ], "short_name": "Float", - "title": "Float", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Wood", "prefixItems": [ { "type": { @@ -3017,12 +3862,12 @@ } ], "short_name": "Wood", - "title": "Wood", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Vec", "prefixItems": [ { "type": { @@ -3031,30 +3876,30 @@ } ], "short_name": "Vec", - "title": "Vec", "type": "array", "typeInfo": "Tuple" }, { - "title": "SomeThing" + "long_name": "SomeThing" }, { "additionalProperties": false, + "long_name": "StructLike", "properties": { "a": { - "title": "a", + "long_name": "a", "type": { "$ref": "#/$defs/f32" } }, "b": { - "title": "b", + "long_name": "b", "type": { "$ref": "#/$defs/u32" } }, "c": { - "title": "c", + "long_name": "c", "type": { "$ref": "#/$defs/alloc::string::String" } @@ -3066,22 +3911,21 @@ "c" ], "short_name": "StructLike", - "title": "StructLike", "type": "object", "typeInfo": "Struct" }, { - "title": "None" + "long_name": "None" } ], "short_name": "EnumComplex", - "title": "bevy_example::test_components::EnumComplex", "type": "object", "typeInfo": "Enum" }, "bevy_example::test_components::EnumTest": { "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::EnumTest", "oneOf": [ "Metal", "Wood", @@ -3091,14 +3935,163 @@ "None" ], "short_name": "EnumTest", - "title": "bevy_example::test_components::EnumTest", "type": "string", "typeInfo": "Enum" }, + "bevy_example::test_components::HashmapTestIntColor": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestIntColor", + "properties": { + "inner": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "inner" + ], + "short_name": "HashmapTestIntColor", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::HashmapTestIntString": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestIntString", + "properties": { + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations" + ], + "short_name": "HashmapTestIntString", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::HashmapTestSimple": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestSimple", + "properties": { + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations" + ], + "short_name": "HashmapTestSimple", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::HashmapTestStringColor": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestStringColor", + "properties": { + "inner": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "inner" + ], + "short_name": "HashmapTestStringColor", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::HashmapTestStringColorFlat": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_example::test_components::HashmapTestStringColorFlat", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + ], + "short_name": "HashmapTestStringColorFlat", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_example::test_components::HashmapTestStringEnum": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestStringEnum", + "properties": { + "inner": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "inner" + ], + "short_name": "HashmapTestStringEnum", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::HashmapTestStringFloat": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestStringFloat", + "properties": { + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations" + ], + "short_name": "HashmapTestStringFloat", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_example::test_components::HashmapTestStringStruct": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::HashmapTestStringStruct", + "properties": { + "inner": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "inner" + ], + "short_name": "HashmapTestStringStruct", + "type": "object", + "typeInfo": "Struct" + }, "bevy_example::test_components::NestedTupleStuff": { "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::NestedTupleStuff", "prefixItems": [ { "type": { @@ -3117,7 +4110,6 @@ } ], "short_name": "NestedTupleStuff", - "title": "bevy_example::test_components::NestedTupleStuff", "type": "array", "typeInfo": "TupleStruct" }, @@ -3125,6 +4117,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::NestingTestLevel2", "properties": { "basic": { "type": { @@ -3178,7 +4171,6 @@ "colors_list" ], "short_name": "NestingTestLevel2", - "title": "bevy_example::test_components::NestingTestLevel2", "type": "object", "typeInfo": "Struct" }, @@ -3186,6 +4178,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::NestingTestLevel3", "properties": { "vec": { "type": { @@ -3197,14 +4190,38 @@ "vec" ], "short_name": "NestingTestLevel3", - "title": "bevy_example::test_components::NestingTestLevel3", "type": "object", "typeInfo": "Struct" }, + "bevy_example::test_components::RedirectPropHitImpulse": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_example::test_components::RedirectPropHitImpulse", + "oneOf": [ + { + "items": false, + "long_name": "Local", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec3" + } + } + ], + "short_name": "Local", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "RedirectPropHitImpulse", + "type": "object", + "typeInfo": "Enum" + }, "bevy_example::test_components::TupleTest2": { "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleTest2", "prefixItems": [ { "type": { @@ -3223,7 +4240,6 @@ } ], "short_name": "TupleTest2", - "title": "bevy_example::test_components::TupleTest2", "type": "array", "typeInfo": "TupleStruct" }, @@ -3231,6 +4247,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleTestBool", "prefixItems": [ { "type": { @@ -3239,7 +4256,6 @@ } ], "short_name": "TupleTestBool", - "title": "bevy_example::test_components::TupleTestBool", "type": "array", "typeInfo": "TupleStruct" }, @@ -3247,15 +4263,15 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleTestColor", "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], "short_name": "TupleTestColor", - "title": "bevy_example::test_components::TupleTestColor", "type": "array", "typeInfo": "TupleStruct" }, @@ -3263,6 +4279,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleTestF32", "prefixItems": [ { "type": { @@ -3271,7 +4288,6 @@ } ], "short_name": "TupleTestF32", - "title": "bevy_example::test_components::TupleTestF32", "type": "array", "typeInfo": "TupleStruct" }, @@ -3279,6 +4295,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleTestStr", "prefixItems": [ { "type": { @@ -3287,7 +4304,6 @@ } ], "short_name": "TupleTestStr", - "title": "bevy_example::test_components::TupleTestStr", "type": "array", "typeInfo": "TupleStruct" }, @@ -3295,6 +4311,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleTestU64", "prefixItems": [ { "type": { @@ -3303,7 +4320,6 @@ } ], "short_name": "TupleTestU64", - "title": "bevy_example::test_components::TupleTestU64", "type": "array", "typeInfo": "TupleStruct" }, @@ -3311,6 +4327,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleVec", "prefixItems": [ { "type": { @@ -3319,7 +4336,6 @@ } ], "short_name": "TupleVec", - "title": "bevy_example::test_components::TupleVec", "type": "array", "typeInfo": "TupleStruct" }, @@ -3327,6 +4343,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleVec2", "prefixItems": [ { "type": { @@ -3335,7 +4352,6 @@ } ], "short_name": "TupleVec2", - "title": "bevy_example::test_components::TupleVec2", "type": "array", "typeInfo": "TupleStruct" }, @@ -3343,6 +4359,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleVec3", "prefixItems": [ { "type": { @@ -3351,7 +4368,6 @@ } ], "short_name": "TupleVec3", - "title": "bevy_example::test_components::TupleVec3", "type": "array", "typeInfo": "TupleStruct" }, @@ -3359,6 +4375,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::TupleVecF32F32", "prefixItems": [ { "type": { @@ -3367,7 +4384,6 @@ } ], "short_name": "TupleVecF32F32", - "title": "bevy_example::test_components::TupleVecF32F32", "type": "array", "typeInfo": "TupleStruct" }, @@ -3375,10 +4391,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_example::test_components::UnitTest", "properties": {}, "required": [], "short_name": "UnitTest", - "title": "bevy_example::test_components::UnitTest", "type": "object", "typeInfo": "Struct" }, @@ -3386,15 +4402,15 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::VecOfColors", "prefixItems": [ { "type": { - "$ref": "#/$defs/alloc::vec::Vec" + "$ref": "#/$defs/alloc::vec::Vec" } } ], "short_name": "VecOfColors", - "title": "bevy_example::test_components::VecOfColors", "type": "array", "typeInfo": "TupleStruct" }, @@ -3402,6 +4418,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::VecOfF32s", "prefixItems": [ { "type": { @@ -3410,7 +4427,22 @@ } ], "short_name": "VecOfF32s", - "title": "bevy_example::test_components::VecOfF32s", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_example::test_components::VecOfUints": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "bevy_example::test_components::VecOfUints", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + ], + "short_name": "VecOfUints", "type": "array", "typeInfo": "TupleStruct" }, @@ -3418,6 +4450,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_example::test_components::VecOfVec3s2", "prefixItems": [ { "type": { @@ -3426,7 +4459,6 @@ } ], "short_name": "VecOfVec3s2", - "title": "bevy_example::test_components::VecOfVec3s2", "type": "array", "typeInfo": "TupleStruct" }, @@ -3434,10 +4466,11 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::aabb::AabbGizmoConfigGroup", "properties": { "default_color": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/core::option::Option" } }, "draw_all": { @@ -3450,7 +4483,6 @@ "draw_all" ], "short_name": "AabbGizmoConfigGroup", - "title": "bevy_gizmos::aabb::AabbGizmoConfigGroup", "type": "object", "typeInfo": "Struct" }, @@ -3458,6 +4490,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_gizmos::config::GizmoConfig", "properties": { "depth_bias": { "type": { @@ -3469,11 +4502,21 @@ "$ref": "#/$defs/bool" } }, + "line_joints": { + "type": { + "$ref": "#/$defs/bevy_gizmos::config::GizmoLineJoint" + } + }, "line_perspective": { "type": { "$ref": "#/$defs/bool" } }, + "line_style": { + "type": { + "$ref": "#/$defs/bevy_gizmos::config::GizmoLineStyle" + } + }, "line_width": { "type": { "$ref": "#/$defs/f32" @@ -3489,11 +4532,144 @@ "enabled", "line_width", "line_perspective", + "line_style", "depth_bias", - "render_layers" + "render_layers", + "line_joints" ], "short_name": "GizmoConfig", - "title": "bevy_gizmos::config::GizmoConfig", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoConfigStore": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_gizmos::config::GizmoConfigStore", + "properties": {}, + "required": [], + "short_name": "GizmoConfigStore", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_gizmos::config::GizmoLineJoint": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineJoint", + "oneOf": [ + { + "long_name": "None" + }, + { + "long_name": "Miter" + }, + { + "items": false, + "long_name": "Round", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u32" + } + } + ], + "short_name": "Round", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Bevel" + } + ], + "short_name": "GizmoLineJoint", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_gizmos::config::GizmoLineStyle": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::config::GizmoLineStyle", + "oneOf": [ + "Solid", + "Dotted" + ], + "short_name": "GizmoLineStyle", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_gizmos::light::LightGizmoColor": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoColor", + "oneOf": [ + { + "items": false, + "long_name": "Manual", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Manual", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "Varied" + }, + { + "long_name": "MatchLightColor" + }, + { + "long_name": "ByLightType" + } + ], + "short_name": "LightGizmoColor", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_gizmos::light::LightGizmoConfigGroup": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_gizmos::light::LightGizmoConfigGroup", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_gizmos::light::LightGizmoColor" + } + }, + "directional_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "draw_all": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "point_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "spot_light_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "required": [ + "draw_all", + "color", + "point_light_color", + "spot_light_color", + "directional_light_color" + ], + "short_name": "LightGizmoConfigGroup", "type": "object", "typeInfo": "Struct" }, @@ -3501,6 +4677,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfExtras", "properties": { "value": { "type": { @@ -3512,347 +4689,79 @@ "value" ], "short_name": "GltfExtras", - "title": "bevy_gltf::GltfExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_blueprints::animation::Animations": { + "bevy_gltf::GltfMaterialExtras": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfMaterialExtras", "properties": { - "named_animations": { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - }, - "required": [ - "named_animations" - ], - "short_name": "Animations", - "title": "bevy_gltf_blueprints::animation::Animations", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_blueprints::materials::MaterialInfo": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "name": { - "type": { - "$ref": "#/$defs/alloc::string::String" - } - }, - "source": { + "value": { "type": { "$ref": "#/$defs/alloc::string::String" } } }, "required": [ - "name", - "source" + "value" ], - "short_name": "MaterialInfo", - "title": "bevy_gltf_blueprints::materials::MaterialInfo", + "short_name": "GltfMaterialExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName": { + "bevy_gltf::GltfMeshExtras": { + "additionalProperties": false, "isComponent": true, "isResource": false, - "items": false, - "prefixItems": [ - { + "long_name": "bevy_gltf::GltfMeshExtras", + "properties": { + "value": { "type": { "$ref": "#/$defs/alloc::string::String" } } + }, + "required": [ + "value" ], - "short_name": "BlueprintName", - "title": "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" - } - } - ], - "short_name": "BlueprintsList", - "title": "bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "SpawnHere", - "title": "bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere", + "short_name": "GltfMeshExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_components::GltfProcessed": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "GltfProcessed", - "title": "bevy_gltf_components::GltfProcessed", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader": { + "bevy_gltf::GltfSceneExtras": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_gltf::GltfSceneExtras", "properties": { - "color": { + "value": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - }, - "strength": { - "type": { - "$ref": "#/$defs/f32" + "$ref": "#/$defs/alloc::string::String" } } }, "required": [ - "color", - "strength" + "value" ], - "short_name": "BlenderBackgroundShader", - "title": "bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader", + "short_name": "GltfSceneExtras", "type": "object", "typeInfo": "Struct" }, - "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "buffer_bias": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled", - "buffer_bias" - ], - "short_name": "BlenderLightShadows", - "title": "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "cascade_size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "cascade_size" - ], - "short_name": "BlenderShadowSettings", - "title": "bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "SSAOSettings", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "CameraTrackable", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "offset": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "offset" - ], - "short_name": "CameraTracking", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "CameraTrackingOffset", - "title": "bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_gltf_worlflow_examples_common::game::picking::Pickable": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Pickable", - "title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common::game::player::Player": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Player", - "title": "bevy_gltf_worlflow_examples_common::game::player::Player", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": { - "isComponent": true, - "isResource": false, - "oneOf": [ - "Cuboid", - "Ball", - "Capsule" - ], - "short_name": "AutoAABBCollider", - "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Ball", - "title": "Ball", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - ], - "short_name": "Cuboid", - "title": "Cuboid", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Capsule", - "title": "Capsule", - "type": "array", - "typeInfo": "Tuple" - }, - { - "title": "Mesh" - } - ], - "short_name": "Collider", - "title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider", - "type": "object", - "typeInfo": "Enum" - }, "bevy_hierarchy::components::children::Children": { "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_hierarchy::components::children::Children", "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" + "$ref": "#/$defs/smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" } } ], "short_name": "Children", - "title": "bevy_hierarchy::components::children::Children", "type": "array", "typeInfo": "TupleStruct" }, @@ -3860,6 +4769,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_hierarchy::components::parent::Parent", "prefixItems": [ { "type": { @@ -3868,19 +4778,18 @@ } ], "short_name": "Parent", - "title": "bevy_hierarchy::components::parent::Parent", "type": "array", "typeInfo": "TupleStruct" }, "bevy_input::ButtonState": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::ButtonState", "oneOf": [ "Pressed", "Released" ], "short_name": "ButtonState", - "title": "bevy_input::ButtonState", "type": "string", "typeInfo": "Enum" }, @@ -3888,6 +4797,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::AxisSettings", "properties": { "deadzone_lowerbound": { "type": { @@ -3923,7 +4833,6 @@ "threshold" ], "short_name": "AxisSettings", - "title": "bevy_input::gamepad::AxisSettings", "type": "object", "typeInfo": "Struct" }, @@ -3931,6 +4840,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::ButtonAxisSettings", "properties": { "high": { "type": { @@ -3954,7 +4864,6 @@ "threshold" ], "short_name": "ButtonAxisSettings", - "title": "bevy_input::gamepad::ButtonAxisSettings", "type": "object", "typeInfo": "Struct" }, @@ -3962,6 +4871,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::ButtonSettings", "properties": { "press_threshold": { "type": { @@ -3979,7 +4889,6 @@ "release_threshold" ], "short_name": "ButtonSettings", - "title": "bevy_input::gamepad::ButtonSettings", "type": "object", "typeInfo": "Struct" }, @@ -3987,6 +4896,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::Gamepad", "properties": { "id": { "type": { @@ -3998,7 +4908,6 @@ "id" ], "short_name": "Gamepad", - "title": "bevy_input::gamepad::Gamepad", "type": "object", "typeInfo": "Struct" }, @@ -4006,6 +4915,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxis", "properties": { "axis_type": { "type": { @@ -4023,34 +4933,66 @@ "axis_type" ], "short_name": "GamepadAxis", - "title": "bevy_input::gamepad::GamepadAxis", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadAxisChangedEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisChangedEvent", + "properties": { + "axis_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "gamepad", + "axis_type", + "value" + ], + "short_name": "GamepadAxisChangedEvent", "type": "object", "typeInfo": "Struct" }, "bevy_input::gamepad::GamepadAxisType": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadAxisType", "oneOf": [ { - "title": "LeftStickX" + "long_name": "LeftStickX" }, { - "title": "LeftStickY" + "long_name": "LeftStickY" }, { - "title": "LeftZ" + "long_name": "LeftZ" }, { - "title": "RightStickX" + "long_name": "RightStickX" }, { - "title": "RightStickY" + "long_name": "RightStickY" }, { - "title": "RightZ" + "long_name": "RightZ" }, { "items": false, + "long_name": "Other", "prefixItems": [ { "type": { @@ -4059,13 +5001,11 @@ } ], "short_name": "Other", - "title": "Other", "type": "array", "typeInfo": "Tuple" } ], "short_name": "GamepadAxisType", - "title": "bevy_input::gamepad::GamepadAxisType", "type": "object", "typeInfo": "Enum" }, @@ -4073,6 +5013,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButton", "properties": { "button_type": { "type": { @@ -4090,7 +5031,37 @@ "button_type" ], "short_name": "GamepadButton", - "title": "bevy_input::gamepad::GamepadButton", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadButtonChangedEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonChangedEvent", + "properties": { + "button_type": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonType" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + }, + "value": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "gamepad", + "button_type", + "value" + ], + "short_name": "GamepadButtonChangedEvent", "type": "object", "typeInfo": "Struct" }, @@ -4098,6 +5069,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonInput", "properties": { "button": { "type": { @@ -4115,73 +5087,74 @@ "state" ], "short_name": "GamepadButtonInput", - "title": "bevy_input::gamepad::GamepadButtonInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::gamepad::GamepadButtonType": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadButtonType", "oneOf": [ { - "title": "South" + "long_name": "South" }, { - "title": "East" + "long_name": "East" }, { - "title": "North" + "long_name": "North" }, { - "title": "West" + "long_name": "West" }, { - "title": "C" + "long_name": "C" }, { - "title": "Z" + "long_name": "Z" }, { - "title": "LeftTrigger" + "long_name": "LeftTrigger" }, { - "title": "LeftTrigger2" + "long_name": "LeftTrigger2" }, { - "title": "RightTrigger" + "long_name": "RightTrigger" }, { - "title": "RightTrigger2" + "long_name": "RightTrigger2" }, { - "title": "Select" + "long_name": "Select" }, { - "title": "Start" + "long_name": "Start" }, { - "title": "Mode" + "long_name": "Mode" }, { - "title": "LeftThumb" + "long_name": "LeftThumb" }, { - "title": "RightThumb" + "long_name": "RightThumb" }, { - "title": "DPadUp" + "long_name": "DPadUp" }, { - "title": "DPadDown" + "long_name": "DPadDown" }, { - "title": "DPadLeft" + "long_name": "DPadLeft" }, { - "title": "DPadRight" + "long_name": "DPadRight" }, { "items": false, + "long_name": "Other", "prefixItems": [ { "type": { @@ -4190,22 +5163,22 @@ } ], "short_name": "Other", - "title": "Other", "type": "array", "typeInfo": "Tuple" } ], "short_name": "GamepadButtonType", - "title": "bevy_input::gamepad::GamepadButtonType", "type": "object", "typeInfo": "Enum" }, "bevy_input::gamepad::GamepadConnection": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnection", "oneOf": [ { "items": false, + "long_name": "Connected", "prefixItems": [ { "type": { @@ -4214,23 +5187,118 @@ } ], "short_name": "Connected", - "title": "Connected", "type": "array", "typeInfo": "Tuple" }, { - "title": "Disconnected" + "long_name": "Disconnected" } ], "short_name": "GamepadConnection", - "title": "bevy_input::gamepad::GamepadConnection", "type": "object", "typeInfo": "Enum" }, + "bevy_input::gamepad::GamepadConnectionEvent": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadConnectionEvent", + "properties": { + "connection": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadConnection" + } + }, + "gamepad": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::Gamepad" + } + } + }, + "required": [ + "gamepad", + "connection" + ], + "short_name": "GamepadConnectionEvent", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gamepad::GamepadEvent": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadEvent", + "oneOf": [ + { + "items": false, + "long_name": "Connection", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadConnectionEvent" + } + } + ], + "short_name": "Connection", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Button", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButtonChangedEvent" + } + } + ], + "short_name": "Button", + "type": "array", + "typeInfo": "Tuple" + }, + { + "items": false, + "long_name": "Axis", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxisChangedEvent" + } + } + ], + "short_name": "Axis", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "GamepadEvent", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_input::gamepad::GamepadInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gamepad::GamepadInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name" + ], + "short_name": "GamepadInfo", + "type": "object", + "typeInfo": "Struct" + }, "bevy_input::gamepad::GamepadSettings": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::gamepad::GamepadSettings", "properties": { "axis_settings": { "type": { @@ -4272,16 +5340,76 @@ "button_axis_settings" ], "short_name": "GamepadSettings", - "title": "bevy_input::gamepad::GamepadSettings", "type": "object", "typeInfo": "Struct" }, + "bevy_input::gestures::DoubleTapGesture": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_input::gestures::DoubleTapGesture", + "properties": {}, + "required": [], + "short_name": "DoubleTapGesture", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_input::gestures::PanGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::PanGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "PanGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::gestures::PinchGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::PinchGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "PinchGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_input::gestures::RotationGesture": { + "isComponent": false, + "isResource": false, + "items": false, + "long_name": "bevy_input::gestures::RotationGesture", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "RotationGesture", + "type": "array", + "typeInfo": "TupleStruct" + }, "bevy_input::keyboard::Key": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::Key", "oneOf": [ { "items": false, + "long_name": "Character", "prefixItems": [ { "type": { @@ -4290,12 +5418,12 @@ } ], "short_name": "Character", - "title": "Character", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Unidentified", "prefixItems": [ { "type": { @@ -4304,12 +5432,12 @@ } ], "short_name": "Unidentified", - "title": "Unidentified", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Dead", "prefixItems": [ { "type": { @@ -4318,940 +5446,940 @@ } ], "short_name": "Dead", - "title": "Dead", "type": "array", "typeInfo": "Tuple" }, { - "title": "Alt" + "long_name": "Alt" }, { - "title": "AltGraph" + "long_name": "AltGraph" }, { - "title": "CapsLock" + "long_name": "CapsLock" }, { - "title": "Control" + "long_name": "Control" }, { - "title": "Fn" + "long_name": "Fn" }, { - "title": "FnLock" + "long_name": "FnLock" }, { - "title": "NumLock" + "long_name": "NumLock" }, { - "title": "ScrollLock" + "long_name": "ScrollLock" }, { - "title": "Shift" + "long_name": "Shift" }, { - "title": "Symbol" + "long_name": "Symbol" }, { - "title": "SymbolLock" + "long_name": "SymbolLock" }, { - "title": "Meta" + "long_name": "Meta" }, { - "title": "Hyper" + "long_name": "Hyper" }, { - "title": "Super" + "long_name": "Super" }, { - "title": "Enter" + "long_name": "Enter" }, { - "title": "Tab" + "long_name": "Tab" }, { - "title": "Space" + "long_name": "Space" }, { - "title": "ArrowDown" + "long_name": "ArrowDown" }, { - "title": "ArrowLeft" + "long_name": "ArrowLeft" }, { - "title": "ArrowRight" + "long_name": "ArrowRight" }, { - "title": "ArrowUp" + "long_name": "ArrowUp" }, { - "title": "End" + "long_name": "End" }, { - "title": "Home" + "long_name": "Home" }, { - "title": "PageDown" + "long_name": "PageDown" }, { - "title": "PageUp" + "long_name": "PageUp" }, { - "title": "Backspace" + "long_name": "Backspace" }, { - "title": "Clear" + "long_name": "Clear" }, { - "title": "Copy" + "long_name": "Copy" }, { - "title": "CrSel" + "long_name": "CrSel" }, { - "title": "Cut" + "long_name": "Cut" }, { - "title": "Delete" + "long_name": "Delete" }, { - "title": "EraseEof" + "long_name": "EraseEof" }, { - "title": "ExSel" + "long_name": "ExSel" }, { - "title": "Insert" + "long_name": "Insert" }, { - "title": "Paste" + "long_name": "Paste" }, { - "title": "Redo" + "long_name": "Redo" }, { - "title": "Undo" + "long_name": "Undo" }, { - "title": "Accept" + "long_name": "Accept" }, { - "title": "Again" + "long_name": "Again" }, { - "title": "Attn" + "long_name": "Attn" }, { - "title": "Cancel" + "long_name": "Cancel" }, { - "title": "ContextMenu" + "long_name": "ContextMenu" }, { - "title": "Escape" + "long_name": "Escape" }, { - "title": "Execute" + "long_name": "Execute" }, { - "title": "Find" + "long_name": "Find" }, { - "title": "Help" + "long_name": "Help" }, { - "title": "Pause" + "long_name": "Pause" }, { - "title": "Play" + "long_name": "Play" }, { - "title": "Props" + "long_name": "Props" }, { - "title": "Select" + "long_name": "Select" }, { - "title": "ZoomIn" + "long_name": "ZoomIn" }, { - "title": "ZoomOut" + "long_name": "ZoomOut" }, { - "title": "BrightnessDown" + "long_name": "BrightnessDown" }, { - "title": "BrightnessUp" + "long_name": "BrightnessUp" }, { - "title": "Eject" + "long_name": "Eject" }, { - "title": "LogOff" + "long_name": "LogOff" }, { - "title": "Power" + "long_name": "Power" }, { - "title": "PowerOff" + "long_name": "PowerOff" }, { - "title": "PrintScreen" + "long_name": "PrintScreen" }, { - "title": "Hibernate" + "long_name": "Hibernate" }, { - "title": "Standby" + "long_name": "Standby" }, { - "title": "WakeUp" + "long_name": "WakeUp" }, { - "title": "AllCandidates" + "long_name": "AllCandidates" }, { - "title": "Alphanumeric" + "long_name": "Alphanumeric" }, { - "title": "CodeInput" + "long_name": "CodeInput" }, { - "title": "Compose" + "long_name": "Compose" }, { - "title": "Convert" + "long_name": "Convert" }, { - "title": "FinalMode" + "long_name": "FinalMode" }, { - "title": "GroupFirst" + "long_name": "GroupFirst" }, { - "title": "GroupLast" + "long_name": "GroupLast" }, { - "title": "GroupNext" + "long_name": "GroupNext" }, { - "title": "GroupPrevious" + "long_name": "GroupPrevious" }, { - "title": "ModeChange" + "long_name": "ModeChange" }, { - "title": "NextCandidate" + "long_name": "NextCandidate" }, { - "title": "NonConvert" + "long_name": "NonConvert" }, { - "title": "PreviousCandidate" + "long_name": "PreviousCandidate" }, { - "title": "Process" + "long_name": "Process" }, { - "title": "SingleCandidate" + "long_name": "SingleCandidate" }, { - "title": "HangulMode" + "long_name": "HangulMode" }, { - "title": "HanjaMode" + "long_name": "HanjaMode" }, { - "title": "JunjaMode" + "long_name": "JunjaMode" }, { - "title": "Eisu" + "long_name": "Eisu" }, { - "title": "Hankaku" + "long_name": "Hankaku" }, { - "title": "Hiragana" + "long_name": "Hiragana" }, { - "title": "HiraganaKatakana" + "long_name": "HiraganaKatakana" }, { - "title": "KanaMode" + "long_name": "KanaMode" }, { - "title": "KanjiMode" + "long_name": "KanjiMode" }, { - "title": "Katakana" + "long_name": "Katakana" }, { - "title": "Romaji" + "long_name": "Romaji" }, { - "title": "Zenkaku" + "long_name": "Zenkaku" }, { - "title": "ZenkakuHankaku" + "long_name": "ZenkakuHankaku" }, { - "title": "Soft1" + "long_name": "Soft1" }, { - "title": "Soft2" + "long_name": "Soft2" }, { - "title": "Soft3" + "long_name": "Soft3" }, { - "title": "Soft4" + "long_name": "Soft4" }, { - "title": "ChannelDown" + "long_name": "ChannelDown" }, { - "title": "ChannelUp" + "long_name": "ChannelUp" }, { - "title": "Close" + "long_name": "Close" }, { - "title": "MailForward" + "long_name": "MailForward" }, { - "title": "MailReply" + "long_name": "MailReply" }, { - "title": "MailSend" + "long_name": "MailSend" }, { - "title": "MediaClose" + "long_name": "MediaClose" }, { - "title": "MediaFastForward" + "long_name": "MediaFastForward" }, { - "title": "MediaPause" + "long_name": "MediaPause" }, { - "title": "MediaPlay" + "long_name": "MediaPlay" }, { - "title": "MediaPlayPause" + "long_name": "MediaPlayPause" }, { - "title": "MediaRecord" + "long_name": "MediaRecord" }, { - "title": "MediaRewind" + "long_name": "MediaRewind" }, { - "title": "MediaStop" + "long_name": "MediaStop" }, { - "title": "MediaTrackNext" + "long_name": "MediaTrackNext" }, { - "title": "MediaTrackPrevious" + "long_name": "MediaTrackPrevious" }, { - "title": "New" + "long_name": "New" }, { - "title": "Open" + "long_name": "Open" }, { - "title": "Print" + "long_name": "Print" }, { - "title": "Save" + "long_name": "Save" }, { - "title": "SpellCheck" + "long_name": "SpellCheck" }, { - "title": "Key11" + "long_name": "Key11" }, { - "title": "Key12" + "long_name": "Key12" }, { - "title": "AudioBalanceLeft" + "long_name": "AudioBalanceLeft" }, { - "title": "AudioBalanceRight" + "long_name": "AudioBalanceRight" }, { - "title": "AudioBassBoostDown" + "long_name": "AudioBassBoostDown" }, { - "title": "AudioBassBoostToggle" + "long_name": "AudioBassBoostToggle" }, { - "title": "AudioBassBoostUp" + "long_name": "AudioBassBoostUp" }, { - "title": "AudioFaderFront" + "long_name": "AudioFaderFront" }, { - "title": "AudioFaderRear" + "long_name": "AudioFaderRear" }, { - "title": "AudioSurroundModeNext" + "long_name": "AudioSurroundModeNext" }, { - "title": "AudioTrebleDown" + "long_name": "AudioTrebleDown" }, { - "title": "AudioTrebleUp" + "long_name": "AudioTrebleUp" }, { - "title": "AudioVolumeDown" + "long_name": "AudioVolumeDown" }, { - "title": "AudioVolumeUp" + "long_name": "AudioVolumeUp" }, { - "title": "AudioVolumeMute" + "long_name": "AudioVolumeMute" }, { - "title": "MicrophoneToggle" + "long_name": "MicrophoneToggle" }, { - "title": "MicrophoneVolumeDown" + "long_name": "MicrophoneVolumeDown" }, { - "title": "MicrophoneVolumeUp" + "long_name": "MicrophoneVolumeUp" }, { - "title": "MicrophoneVolumeMute" + "long_name": "MicrophoneVolumeMute" }, { - "title": "SpeechCorrectionList" + "long_name": "SpeechCorrectionList" }, { - "title": "SpeechInputToggle" + "long_name": "SpeechInputToggle" }, { - "title": "LaunchApplication1" + "long_name": "LaunchApplication1" }, { - "title": "LaunchApplication2" + "long_name": "LaunchApplication2" }, { - "title": "LaunchCalendar" + "long_name": "LaunchCalendar" }, { - "title": "LaunchContacts" + "long_name": "LaunchContacts" }, { - "title": "LaunchMail" + "long_name": "LaunchMail" }, { - "title": "LaunchMediaPlayer" + "long_name": "LaunchMediaPlayer" }, { - "title": "LaunchMusicPlayer" + "long_name": "LaunchMusicPlayer" }, { - "title": "LaunchPhone" + "long_name": "LaunchPhone" }, { - "title": "LaunchScreenSaver" + "long_name": "LaunchScreenSaver" }, { - "title": "LaunchSpreadsheet" + "long_name": "LaunchSpreadsheet" }, { - "title": "LaunchWebBrowser" + "long_name": "LaunchWebBrowser" }, { - "title": "LaunchWebCam" + "long_name": "LaunchWebCam" }, { - "title": "LaunchWordProcessor" + "long_name": "LaunchWordProcessor" }, { - "title": "BrowserBack" + "long_name": "BrowserBack" }, { - "title": "BrowserFavorites" + "long_name": "BrowserFavorites" }, { - "title": "BrowserForward" + "long_name": "BrowserForward" }, { - "title": "BrowserHome" + "long_name": "BrowserHome" }, { - "title": "BrowserRefresh" + "long_name": "BrowserRefresh" }, { - "title": "BrowserSearch" + "long_name": "BrowserSearch" }, { - "title": "BrowserStop" + "long_name": "BrowserStop" }, { - "title": "AppSwitch" + "long_name": "AppSwitch" }, { - "title": "Call" + "long_name": "Call" }, { - "title": "Camera" + "long_name": "Camera" }, { - "title": "CameraFocus" + "long_name": "CameraFocus" }, { - "title": "EndCall" + "long_name": "EndCall" }, { - "title": "GoBack" + "long_name": "GoBack" }, { - "title": "GoHome" + "long_name": "GoHome" }, { - "title": "HeadsetHook" + "long_name": "HeadsetHook" }, { - "title": "LastNumberRedial" + "long_name": "LastNumberRedial" }, { - "title": "Notification" + "long_name": "Notification" }, { - "title": "MannerMode" + "long_name": "MannerMode" }, { - "title": "VoiceDial" + "long_name": "VoiceDial" }, { - "title": "TV" + "long_name": "TV" }, { - "title": "TV3DMode" + "long_name": "TV3DMode" }, { - "title": "TVAntennaCable" + "long_name": "TVAntennaCable" }, { - "title": "TVAudioDescription" + "long_name": "TVAudioDescription" }, { - "title": "TVAudioDescriptionMixDown" + "long_name": "TVAudioDescriptionMixDown" }, { - "title": "TVAudioDescriptionMixUp" + "long_name": "TVAudioDescriptionMixUp" }, { - "title": "TVContentsMenu" + "long_name": "TVContentsMenu" }, { - "title": "TVDataService" + "long_name": "TVDataService" }, { - "title": "TVInput" + "long_name": "TVInput" }, { - "title": "TVInputComponent1" + "long_name": "TVInputComponent1" }, { - "title": "TVInputComponent2" + "long_name": "TVInputComponent2" }, { - "title": "TVInputComposite1" + "long_name": "TVInputComposite1" }, { - "title": "TVInputComposite2" + "long_name": "TVInputComposite2" }, { - "title": "TVInputHDMI1" + "long_name": "TVInputHDMI1" }, { - "title": "TVInputHDMI2" + "long_name": "TVInputHDMI2" }, { - "title": "TVInputHDMI3" + "long_name": "TVInputHDMI3" }, { - "title": "TVInputHDMI4" + "long_name": "TVInputHDMI4" }, { - "title": "TVInputVGA1" + "long_name": "TVInputVGA1" }, { - "title": "TVMediaContext" + "long_name": "TVMediaContext" }, { - "title": "TVNetwork" + "long_name": "TVNetwork" }, { - "title": "TVNumberEntry" + "long_name": "TVNumberEntry" }, { - "title": "TVPower" + "long_name": "TVPower" }, { - "title": "TVRadioService" + "long_name": "TVRadioService" }, { - "title": "TVSatellite" + "long_name": "TVSatellite" }, { - "title": "TVSatelliteBS" + "long_name": "TVSatelliteBS" }, { - "title": "TVSatelliteCS" + "long_name": "TVSatelliteCS" }, { - "title": "TVSatelliteToggle" + "long_name": "TVSatelliteToggle" }, { - "title": "TVTerrestrialAnalog" + "long_name": "TVTerrestrialAnalog" }, { - "title": "TVTerrestrialDigital" + "long_name": "TVTerrestrialDigital" }, { - "title": "TVTimer" + "long_name": "TVTimer" }, { - "title": "AVRInput" + "long_name": "AVRInput" }, { - "title": "AVRPower" + "long_name": "AVRPower" }, { - "title": "ColorF0Red" + "long_name": "ColorF0Red" }, { - "title": "ColorF1Green" + "long_name": "ColorF1Green" }, { - "title": "ColorF2Yellow" + "long_name": "ColorF2Yellow" }, { - "title": "ColorF3Blue" + "long_name": "ColorF3Blue" }, { - "title": "ColorF4Grey" + "long_name": "ColorF4Grey" }, { - "title": "ColorF5Brown" + "long_name": "ColorF5Brown" }, { - "title": "ClosedCaptionToggle" + "long_name": "ClosedCaptionToggle" }, { - "title": "Dimmer" + "long_name": "Dimmer" }, { - "title": "DisplaySwap" + "long_name": "DisplaySwap" }, { - "title": "DVR" + "long_name": "DVR" }, { - "title": "Exit" + "long_name": "Exit" }, { - "title": "FavoriteClear0" + "long_name": "FavoriteClear0" }, { - "title": "FavoriteClear1" + "long_name": "FavoriteClear1" }, { - "title": "FavoriteClear2" + "long_name": "FavoriteClear2" }, { - "title": "FavoriteClear3" + "long_name": "FavoriteClear3" }, { - "title": "FavoriteRecall0" + "long_name": "FavoriteRecall0" }, { - "title": "FavoriteRecall1" + "long_name": "FavoriteRecall1" }, { - "title": "FavoriteRecall2" + "long_name": "FavoriteRecall2" }, { - "title": "FavoriteRecall3" + "long_name": "FavoriteRecall3" }, { - "title": "FavoriteStore0" + "long_name": "FavoriteStore0" }, { - "title": "FavoriteStore1" + "long_name": "FavoriteStore1" }, { - "title": "FavoriteStore2" + "long_name": "FavoriteStore2" }, { - "title": "FavoriteStore3" + "long_name": "FavoriteStore3" }, { - "title": "Guide" + "long_name": "Guide" }, { - "title": "GuideNextDay" + "long_name": "GuideNextDay" }, { - "title": "GuidePreviousDay" + "long_name": "GuidePreviousDay" }, { - "title": "Info" + "long_name": "Info" }, { - "title": "InstantReplay" + "long_name": "InstantReplay" }, { - "title": "Link" + "long_name": "Link" }, { - "title": "ListProgram" + "long_name": "ListProgram" }, { - "title": "LiveContent" + "long_name": "LiveContent" }, { - "title": "Lock" + "long_name": "Lock" }, { - "title": "MediaApps" + "long_name": "MediaApps" }, { - "title": "MediaAudioTrack" + "long_name": "MediaAudioTrack" }, { - "title": "MediaLast" + "long_name": "MediaLast" }, { - "title": "MediaSkipBackward" + "long_name": "MediaSkipBackward" }, { - "title": "MediaSkipForward" + "long_name": "MediaSkipForward" }, { - "title": "MediaStepBackward" + "long_name": "MediaStepBackward" }, { - "title": "MediaStepForward" + "long_name": "MediaStepForward" }, { - "title": "MediaTopMenu" + "long_name": "MediaTopMenu" }, { - "title": "NavigateIn" + "long_name": "NavigateIn" }, { - "title": "NavigateNext" + "long_name": "NavigateNext" }, { - "title": "NavigateOut" + "long_name": "NavigateOut" }, { - "title": "NavigatePrevious" + "long_name": "NavigatePrevious" }, { - "title": "NextFavoriteChannel" + "long_name": "NextFavoriteChannel" }, { - "title": "NextUserProfile" + "long_name": "NextUserProfile" }, { - "title": "OnDemand" + "long_name": "OnDemand" }, { - "title": "Pairing" + "long_name": "Pairing" }, { - "title": "PinPDown" + "long_name": "PinPDown" }, { - "title": "PinPMove" + "long_name": "PinPMove" }, { - "title": "PinPToggle" + "long_name": "PinPToggle" }, { - "title": "PinPUp" + "long_name": "PinPUp" }, { - "title": "PlaySpeedDown" + "long_name": "PlaySpeedDown" }, { - "title": "PlaySpeedReset" + "long_name": "PlaySpeedReset" }, { - "title": "PlaySpeedUp" + "long_name": "PlaySpeedUp" }, { - "title": "RandomToggle" + "long_name": "RandomToggle" }, { - "title": "RcLowBattery" + "long_name": "RcLowBattery" }, { - "title": "RecordSpeedNext" + "long_name": "RecordSpeedNext" }, { - "title": "RfBypass" + "long_name": "RfBypass" }, { - "title": "ScanChannelsToggle" + "long_name": "ScanChannelsToggle" }, { - "title": "ScreenModeNext" + "long_name": "ScreenModeNext" }, { - "title": "Settings" + "long_name": "Settings" }, { - "title": "SplitScreenToggle" + "long_name": "SplitScreenToggle" }, { - "title": "STBInput" + "long_name": "STBInput" }, { - "title": "STBPower" + "long_name": "STBPower" }, { - "title": "Subtitle" + "long_name": "Subtitle" }, { - "title": "Teletext" + "long_name": "Teletext" }, { - "title": "VideoModeNext" + "long_name": "VideoModeNext" }, { - "title": "Wink" + "long_name": "Wink" }, { - "title": "ZoomToggle" + "long_name": "ZoomToggle" }, { - "title": "F1" + "long_name": "F1" }, { - "title": "F2" + "long_name": "F2" }, { - "title": "F3" + "long_name": "F3" }, { - "title": "F4" + "long_name": "F4" }, { - "title": "F5" + "long_name": "F5" }, { - "title": "F6" + "long_name": "F6" }, { - "title": "F7" + "long_name": "F7" }, { - "title": "F8" + "long_name": "F8" }, { - "title": "F9" + "long_name": "F9" }, { - "title": "F10" + "long_name": "F10" }, { - "title": "F11" + "long_name": "F11" }, { - "title": "F12" + "long_name": "F12" }, { - "title": "F13" + "long_name": "F13" }, { - "title": "F14" + "long_name": "F14" }, { - "title": "F15" + "long_name": "F15" }, { - "title": "F16" + "long_name": "F16" }, { - "title": "F17" + "long_name": "F17" }, { - "title": "F18" + "long_name": "F18" }, { - "title": "F19" + "long_name": "F19" }, { - "title": "F20" + "long_name": "F20" }, { - "title": "F21" + "long_name": "F21" }, { - "title": "F22" + "long_name": "F22" }, { - "title": "F23" + "long_name": "F23" }, { - "title": "F24" + "long_name": "F24" }, { - "title": "F25" + "long_name": "F25" }, { - "title": "F26" + "long_name": "F26" }, { - "title": "F27" + "long_name": "F27" }, { - "title": "F28" + "long_name": "F28" }, { - "title": "F29" + "long_name": "F29" }, { - "title": "F30" + "long_name": "F30" }, { - "title": "F31" + "long_name": "F31" }, { - "title": "F32" + "long_name": "F32" }, { - "title": "F33" + "long_name": "F33" }, { - "title": "F34" + "long_name": "F34" }, { - "title": "F35" + "long_name": "F35" } ], "short_name": "Key", - "title": "bevy_input::keyboard::Key", "type": "object", "typeInfo": "Enum" }, "bevy_input::keyboard::KeyCode": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::KeyCode", "oneOf": [ { "items": false, + "long_name": "Unidentified", "prefixItems": [ { "type": { @@ -5260,595 +6388,593 @@ } ], "short_name": "Unidentified", - "title": "Unidentified", "type": "array", "typeInfo": "Tuple" }, { - "title": "Backquote" + "long_name": "Backquote" }, { - "title": "Backslash" + "long_name": "Backslash" }, { - "title": "BracketLeft" + "long_name": "BracketLeft" }, { - "title": "BracketRight" + "long_name": "BracketRight" }, { - "title": "Comma" + "long_name": "Comma" }, { - "title": "Digit0" + "long_name": "Digit0" }, { - "title": "Digit1" + "long_name": "Digit1" }, { - "title": "Digit2" + "long_name": "Digit2" }, { - "title": "Digit3" + "long_name": "Digit3" }, { - "title": "Digit4" + "long_name": "Digit4" }, { - "title": "Digit5" + "long_name": "Digit5" }, { - "title": "Digit6" + "long_name": "Digit6" }, { - "title": "Digit7" + "long_name": "Digit7" }, { - "title": "Digit8" + "long_name": "Digit8" }, { - "title": "Digit9" + "long_name": "Digit9" }, { - "title": "Equal" + "long_name": "Equal" }, { - "title": "IntlBackslash" + "long_name": "IntlBackslash" }, { - "title": "IntlRo" + "long_name": "IntlRo" }, { - "title": "IntlYen" + "long_name": "IntlYen" }, { - "title": "KeyA" + "long_name": "KeyA" }, { - "title": "KeyB" + "long_name": "KeyB" }, { - "title": "KeyC" + "long_name": "KeyC" }, { - "title": "KeyD" + "long_name": "KeyD" }, { - "title": "KeyE" + "long_name": "KeyE" }, { - "title": "KeyF" + "long_name": "KeyF" }, { - "title": "KeyG" + "long_name": "KeyG" }, { - "title": "KeyH" + "long_name": "KeyH" }, { - "title": "KeyI" + "long_name": "KeyI" }, { - "title": "KeyJ" + "long_name": "KeyJ" }, { - "title": "KeyK" + "long_name": "KeyK" }, { - "title": "KeyL" + "long_name": "KeyL" }, { - "title": "KeyM" + "long_name": "KeyM" }, { - "title": "KeyN" + "long_name": "KeyN" }, { - "title": "KeyO" + "long_name": "KeyO" }, { - "title": "KeyP" + "long_name": "KeyP" }, { - "title": "KeyQ" + "long_name": "KeyQ" }, { - "title": "KeyR" + "long_name": "KeyR" }, { - "title": "KeyS" + "long_name": "KeyS" }, { - "title": "KeyT" + "long_name": "KeyT" }, { - "title": "KeyU" + "long_name": "KeyU" }, { - "title": "KeyV" + "long_name": "KeyV" }, { - "title": "KeyW" + "long_name": "KeyW" }, { - "title": "KeyX" + "long_name": "KeyX" }, { - "title": "KeyY" + "long_name": "KeyY" }, { - "title": "KeyZ" + "long_name": "KeyZ" }, { - "title": "Minus" + "long_name": "Minus" }, { - "title": "Period" + "long_name": "Period" }, { - "title": "Quote" + "long_name": "Quote" }, { - "title": "Semicolon" + "long_name": "Semicolon" }, { - "title": "Slash" + "long_name": "Slash" }, { - "title": "AltLeft" + "long_name": "AltLeft" }, { - "title": "AltRight" + "long_name": "AltRight" }, { - "title": "Backspace" + "long_name": "Backspace" }, { - "title": "CapsLock" + "long_name": "CapsLock" }, { - "title": "ContextMenu" + "long_name": "ContextMenu" }, { - "title": "ControlLeft" + "long_name": "ControlLeft" }, { - "title": "ControlRight" + "long_name": "ControlRight" }, { - "title": "Enter" + "long_name": "Enter" }, { - "title": "SuperLeft" + "long_name": "SuperLeft" }, { - "title": "SuperRight" + "long_name": "SuperRight" }, { - "title": "ShiftLeft" + "long_name": "ShiftLeft" }, { - "title": "ShiftRight" + "long_name": "ShiftRight" }, { - "title": "Space" + "long_name": "Space" }, { - "title": "Tab" + "long_name": "Tab" }, { - "title": "Convert" + "long_name": "Convert" }, { - "title": "KanaMode" + "long_name": "KanaMode" }, { - "title": "Lang1" + "long_name": "Lang1" }, { - "title": "Lang2" + "long_name": "Lang2" }, { - "title": "Lang3" + "long_name": "Lang3" }, { - "title": "Lang4" + "long_name": "Lang4" }, { - "title": "Lang5" + "long_name": "Lang5" }, { - "title": "NonConvert" + "long_name": "NonConvert" }, { - "title": "Delete" + "long_name": "Delete" }, { - "title": "End" + "long_name": "End" }, { - "title": "Help" + "long_name": "Help" }, { - "title": "Home" + "long_name": "Home" }, { - "title": "Insert" + "long_name": "Insert" }, { - "title": "PageDown" + "long_name": "PageDown" }, { - "title": "PageUp" + "long_name": "PageUp" }, { - "title": "ArrowDown" + "long_name": "ArrowDown" }, { - "title": "ArrowLeft" + "long_name": "ArrowLeft" }, { - "title": "ArrowRight" + "long_name": "ArrowRight" }, { - "title": "ArrowUp" + "long_name": "ArrowUp" }, { - "title": "NumLock" + "long_name": "NumLock" }, { - "title": "Numpad0" + "long_name": "Numpad0" }, { - "title": "Numpad1" + "long_name": "Numpad1" }, { - "title": "Numpad2" + "long_name": "Numpad2" }, { - "title": "Numpad3" + "long_name": "Numpad3" }, { - "title": "Numpad4" + "long_name": "Numpad4" }, { - "title": "Numpad5" + "long_name": "Numpad5" }, { - "title": "Numpad6" + "long_name": "Numpad6" }, { - "title": "Numpad7" + "long_name": "Numpad7" }, { - "title": "Numpad8" + "long_name": "Numpad8" }, { - "title": "Numpad9" + "long_name": "Numpad9" }, { - "title": "NumpadAdd" + "long_name": "NumpadAdd" }, { - "title": "NumpadBackspace" + "long_name": "NumpadBackspace" }, { - "title": "NumpadClear" + "long_name": "NumpadClear" }, { - "title": "NumpadClearEntry" + "long_name": "NumpadClearEntry" }, { - "title": "NumpadComma" + "long_name": "NumpadComma" }, { - "title": "NumpadDecimal" + "long_name": "NumpadDecimal" }, { - "title": "NumpadDivide" + "long_name": "NumpadDivide" }, { - "title": "NumpadEnter" + "long_name": "NumpadEnter" }, { - "title": "NumpadEqual" + "long_name": "NumpadEqual" }, { - "title": "NumpadHash" + "long_name": "NumpadHash" }, { - "title": "NumpadMemoryAdd" + "long_name": "NumpadMemoryAdd" }, { - "title": "NumpadMemoryClear" + "long_name": "NumpadMemoryClear" }, { - "title": "NumpadMemoryRecall" + "long_name": "NumpadMemoryRecall" }, { - "title": "NumpadMemoryStore" + "long_name": "NumpadMemoryStore" }, { - "title": "NumpadMemorySubtract" + "long_name": "NumpadMemorySubtract" }, { - "title": "NumpadMultiply" + "long_name": "NumpadMultiply" }, { - "title": "NumpadParenLeft" + "long_name": "NumpadParenLeft" }, { - "title": "NumpadParenRight" + "long_name": "NumpadParenRight" }, { - "title": "NumpadStar" + "long_name": "NumpadStar" }, { - "title": "NumpadSubtract" + "long_name": "NumpadSubtract" }, { - "title": "Escape" + "long_name": "Escape" }, { - "title": "Fn" + "long_name": "Fn" }, { - "title": "FnLock" + "long_name": "FnLock" }, { - "title": "PrintScreen" + "long_name": "PrintScreen" }, { - "title": "ScrollLock" + "long_name": "ScrollLock" }, { - "title": "Pause" + "long_name": "Pause" }, { - "title": "BrowserBack" + "long_name": "BrowserBack" }, { - "title": "BrowserFavorites" + "long_name": "BrowserFavorites" }, { - "title": "BrowserForward" + "long_name": "BrowserForward" }, { - "title": "BrowserHome" + "long_name": "BrowserHome" }, { - "title": "BrowserRefresh" + "long_name": "BrowserRefresh" }, { - "title": "BrowserSearch" + "long_name": "BrowserSearch" }, { - "title": "BrowserStop" + "long_name": "BrowserStop" }, { - "title": "Eject" + "long_name": "Eject" }, { - "title": "LaunchApp1" + "long_name": "LaunchApp1" }, { - "title": "LaunchApp2" + "long_name": "LaunchApp2" }, { - "title": "LaunchMail" + "long_name": "LaunchMail" }, { - "title": "MediaPlayPause" + "long_name": "MediaPlayPause" }, { - "title": "MediaSelect" + "long_name": "MediaSelect" }, { - "title": "MediaStop" + "long_name": "MediaStop" }, { - "title": "MediaTrackNext" + "long_name": "MediaTrackNext" }, { - "title": "MediaTrackPrevious" + "long_name": "MediaTrackPrevious" }, { - "title": "Power" + "long_name": "Power" }, { - "title": "Sleep" + "long_name": "Sleep" }, { - "title": "AudioVolumeDown" + "long_name": "AudioVolumeDown" }, { - "title": "AudioVolumeMute" + "long_name": "AudioVolumeMute" }, { - "title": "AudioVolumeUp" + "long_name": "AudioVolumeUp" }, { - "title": "WakeUp" + "long_name": "WakeUp" }, { - "title": "Meta" + "long_name": "Meta" }, { - "title": "Hyper" + "long_name": "Hyper" }, { - "title": "Turbo" + "long_name": "Turbo" }, { - "title": "Abort" + "long_name": "Abort" }, { - "title": "Resume" + "long_name": "Resume" }, { - "title": "Suspend" + "long_name": "Suspend" }, { - "title": "Again" + "long_name": "Again" }, { - "title": "Copy" + "long_name": "Copy" }, { - "title": "Cut" + "long_name": "Cut" }, { - "title": "Find" + "long_name": "Find" }, { - "title": "Open" + "long_name": "Open" }, { - "title": "Paste" + "long_name": "Paste" }, { - "title": "Props" + "long_name": "Props" }, { - "title": "Select" + "long_name": "Select" }, { - "title": "Undo" + "long_name": "Undo" }, { - "title": "Hiragana" + "long_name": "Hiragana" }, { - "title": "Katakana" + "long_name": "Katakana" }, { - "title": "F1" + "long_name": "F1" }, { - "title": "F2" + "long_name": "F2" }, { - "title": "F3" + "long_name": "F3" }, { - "title": "F4" + "long_name": "F4" }, { - "title": "F5" + "long_name": "F5" }, { - "title": "F6" + "long_name": "F6" }, { - "title": "F7" + "long_name": "F7" }, { - "title": "F8" + "long_name": "F8" }, { - "title": "F9" + "long_name": "F9" }, { - "title": "F10" + "long_name": "F10" }, { - "title": "F11" + "long_name": "F11" }, { - "title": "F12" + "long_name": "F12" }, { - "title": "F13" + "long_name": "F13" }, { - "title": "F14" + "long_name": "F14" }, { - "title": "F15" + "long_name": "F15" }, { - "title": "F16" + "long_name": "F16" }, { - "title": "F17" + "long_name": "F17" }, { - "title": "F18" + "long_name": "F18" }, { - "title": "F19" + "long_name": "F19" }, { - "title": "F20" + "long_name": "F20" }, { - "title": "F21" + "long_name": "F21" }, { - "title": "F22" + "long_name": "F22" }, { - "title": "F23" + "long_name": "F23" }, { - "title": "F24" + "long_name": "F24" }, { - "title": "F25" + "long_name": "F25" }, { - "title": "F26" + "long_name": "F26" }, { - "title": "F27" + "long_name": "F27" }, { - "title": "F28" + "long_name": "F28" }, { - "title": "F29" + "long_name": "F29" }, { - "title": "F30" + "long_name": "F30" }, { - "title": "F31" + "long_name": "F31" }, { - "title": "F32" + "long_name": "F32" }, { - "title": "F33" + "long_name": "F33" }, { - "title": "F34" + "long_name": "F34" }, { - "title": "F35" + "long_name": "F35" } ], "short_name": "KeyCode", - "title": "bevy_input::keyboard::KeyCode", "type": "object", "typeInfo": "Enum" }, @@ -5856,6 +6982,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::KeyboardInput", "properties": { "key_code": { "type": { @@ -5885,19 +7012,20 @@ "window" ], "short_name": "KeyboardInput", - "title": "bevy_input::keyboard::KeyboardInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::keyboard::NativeKey": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::NativeKey", "oneOf": [ { - "title": "Unidentified" + "long_name": "Unidentified" }, { "items": false, + "long_name": "Android", "prefixItems": [ { "type": { @@ -5906,12 +7034,12 @@ } ], "short_name": "Android", - "title": "Android", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "MacOS", "prefixItems": [ { "type": { @@ -5920,12 +7048,12 @@ } ], "short_name": "MacOS", - "title": "MacOS", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Windows", "prefixItems": [ { "type": { @@ -5934,12 +7062,12 @@ } ], "short_name": "Windows", - "title": "Windows", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Xkb", "prefixItems": [ { "type": { @@ -5948,12 +7076,12 @@ } ], "short_name": "Xkb", - "title": "Xkb", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Web", "prefixItems": [ { "type": { @@ -5962,25 +7090,25 @@ } ], "short_name": "Web", - "title": "Web", "type": "array", "typeInfo": "Tuple" } ], "short_name": "NativeKey", - "title": "bevy_input::keyboard::NativeKey", "type": "object", "typeInfo": "Enum" }, "bevy_input::keyboard::NativeKeyCode": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::keyboard::NativeKeyCode", "oneOf": [ { - "title": "Unidentified" + "long_name": "Unidentified" }, { "items": false, + "long_name": "Android", "prefixItems": [ { "type": { @@ -5989,12 +7117,12 @@ } ], "short_name": "Android", - "title": "Android", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "MacOS", "prefixItems": [ { "type": { @@ -6003,12 +7131,12 @@ } ], "short_name": "MacOS", - "title": "MacOS", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Windows", "prefixItems": [ { "type": { @@ -6017,12 +7145,12 @@ } ], "short_name": "Windows", - "title": "Windows", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Xkb", "prefixItems": [ { "type": { @@ -6031,37 +7159,37 @@ } ], "short_name": "Xkb", - "title": "Xkb", "type": "array", "typeInfo": "Tuple" } ], "short_name": "NativeKeyCode", - "title": "bevy_input::keyboard::NativeKeyCode", "type": "object", "typeInfo": "Enum" }, "bevy_input::mouse::MouseButton": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::mouse::MouseButton", "oneOf": [ { - "title": "Left" + "long_name": "Left" }, { - "title": "Right" + "long_name": "Right" }, { - "title": "Middle" + "long_name": "Middle" }, { - "title": "Back" + "long_name": "Back" }, { - "title": "Forward" + "long_name": "Forward" }, { "items": false, + "long_name": "Other", "prefixItems": [ { "type": { @@ -6070,13 +7198,11 @@ } ], "short_name": "Other", - "title": "Other", "type": "array", "typeInfo": "Tuple" } ], "short_name": "MouseButton", - "title": "bevy_input::mouse::MouseButton", "type": "object", "typeInfo": "Enum" }, @@ -6084,6 +7210,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::mouse::MouseButtonInput", "properties": { "button": { "type": { @@ -6107,99 +7234,32 @@ "window" ], "short_name": "MouseButtonInput", - "title": "bevy_input::mouse::MouseButtonInput", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_input::mouse::MouseMotion": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "delta": { - "type": { - "$ref": "#/$defs/glam::Vec2" - } - } - }, - "required": [ - "delta" - ], - "short_name": "MouseMotion", - "title": "bevy_input::mouse::MouseMotion", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_input::mouse::MouseScrollUnit": { - "isComponent": false, - "isResource": false, - "oneOf": [ - "Line", - "Pixel" - ], - "short_name": "MouseScrollUnit", - "title": "bevy_input::mouse::MouseScrollUnit", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_input::mouse::MouseWheel": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "unit": { - "type": { - "$ref": "#/$defs/bevy_input::mouse::MouseScrollUnit" - } - }, - "window": { - "type": { - "$ref": "#/$defs/bevy_ecs::entity::Entity" - } - }, - "x": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "unit", - "x", - "y", - "window" - ], - "short_name": "MouseWheel", - "title": "bevy_input::mouse::MouseWheel", "type": "object", "typeInfo": "Struct" }, "bevy_input::touch::ForceTouch": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::touch::ForceTouch", "oneOf": [ { "additionalProperties": false, + "long_name": "Calibrated", "properties": { "altitude_angle": { - "title": "altitude_angle", + "long_name": "altitude_angle", "type": { "$ref": "#/$defs/core::option::Option" } }, "force": { - "title": "force", + "long_name": "force", "type": { "$ref": "#/$defs/f64" } }, "max_possible_force": { - "title": "max_possible_force", + "long_name": "max_possible_force", "type": { "$ref": "#/$defs/f64" } @@ -6210,12 +7270,12 @@ "max_possible_force" ], "short_name": "Calibrated", - "title": "Calibrated", "type": "object", "typeInfo": "Struct" }, { "items": false, + "long_name": "Normalized", "prefixItems": [ { "type": { @@ -6224,13 +7284,11 @@ } ], "short_name": "Normalized", - "title": "Normalized", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ForceTouch", - "title": "bevy_input::touch::ForceTouch", "type": "object", "typeInfo": "Enum" }, @@ -6238,6 +7296,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_input::touch::TouchInput", "properties": { "force": { "type": { @@ -6272,13 +7331,13 @@ "id" ], "short_name": "TouchInput", - "title": "bevy_input::touch::TouchInput", "type": "object", "typeInfo": "Struct" }, "bevy_input::touch::TouchPhase": { "isComponent": false, "isResource": false, + "long_name": "bevy_input::touch::TouchPhase", "oneOf": [ "Started", "Moved", @@ -6286,46 +7345,14 @@ "Canceled" ], "short_name": "TouchPhase", - "title": "bevy_input::touch::TouchPhase", "type": "string", "typeInfo": "Enum" }, - "bevy_input::touchpad::TouchpadMagnify": { - "isComponent": false, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "TouchpadMagnify", - "title": "bevy_input::touchpad::TouchpadMagnify", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_input::touchpad::TouchpadRotate": { - "isComponent": false, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "TouchpadRotate", - "title": "bevy_input::touchpad::TouchpadRotate", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_math::Rect": { + "bevy_math::rects::rect::Rect": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_math::rects::rect::Rect", "properties": { "max": { "type": { @@ -6343,57 +7370,42 @@ "max" ], "short_name": "Rect", - "title": "bevy_math::Rect", "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::alpha::AlphaMode": { + "bevy_math::rects::urect::URect": { + "additionalProperties": false, "isComponent": false, "isResource": false, - "oneOf": [ - { - "title": "Opaque" + "long_name": "bevy_math::rects::urect::URect", + "properties": { + "max": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Mask", - "title": "Mask", - "type": "array", - "typeInfo": "Tuple" - }, - { - "title": "Blend" - }, - { - "title": "Premultiplied" - }, - { - "title": "Add" - }, - { - "title": "Multiply" + "min": { + "type": { + "$ref": "#/$defs/glam::UVec2" + } } + }, + "required": [ + "min", + "max" ], - "short_name": "AlphaMode", - "title": "bevy_pbr::alpha::AlphaMode", + "short_name": "URect", "type": "object", - "typeInfo": "Enum" + "typeInfo": "Struct" }, "bevy_pbr::bundle::CascadesVisibleEntities": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::bundle::CascadesVisibleEntities", "properties": {}, "required": [], "short_name": "CascadesVisibleEntities", - "title": "bevy_pbr::bundle::CascadesVisibleEntities", "type": "object", "typeInfo": "Struct" }, @@ -6401,28 +7413,169 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::bundle::CubemapVisibleEntities", "properties": {}, "required": [], "short_name": "CubemapVisibleEntities", - "title": "bevy_pbr::bundle::CubemapVisibleEntities", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::cluster::ClusterConfig": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterConfig", + "oneOf": [ + { + "long_name": "None" + }, + { + "long_name": "Single" + }, + { + "additionalProperties": false, + "long_name": "XYZ", + "properties": { + "dimensions": { + "long_name": "dimensions", + "type": { + "$ref": "#/$defs/glam::UVec3" + } + }, + "dynamic_resizing": { + "long_name": "dynamic_resizing", + "type": { + "$ref": "#/$defs/bool" + } + }, + "z_config": { + "long_name": "z_config", + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" + } + } + }, + "required": [ + "dimensions", + "z_config", + "dynamic_resizing" + ], + "short_name": "XYZ", + "type": "object", + "typeInfo": "Struct" + }, + { + "additionalProperties": false, + "long_name": "FixedZ", + "properties": { + "dynamic_resizing": { + "long_name": "dynamic_resizing", + "type": { + "$ref": "#/$defs/bool" + } + }, + "total": { + "long_name": "total", + "type": { + "$ref": "#/$defs/u32" + } + }, + "z_config": { + "long_name": "z_config", + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterZConfig" + } + }, + "z_slices": { + "long_name": "z_slices", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "total", + "z_slices", + "z_config", + "dynamic_resizing" + ], + "short_name": "FixedZ", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ClusterConfig", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::cluster::ClusterFarZMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterFarZMode", + "oneOf": [ + { + "long_name": "MaxClusterableObjectRange" + }, + { + "items": false, + "long_name": "Constant", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/f32" + } + } + ], + "short_name": "Constant", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "ClusterFarZMode", + "type": "object", + "typeInfo": "Enum" + }, + "bevy_pbr::cluster::ClusterZConfig": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::cluster::ClusterZConfig", + "properties": { + "far_z_mode": { + "type": { + "$ref": "#/$defs/bevy_pbr::cluster::ClusterFarZMode" + } + }, + "first_slice_depth": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "first_slice_depth", + "far_z_mode" + ], + "short_name": "ClusterZConfig", "type": "object", "typeInfo": "Struct" }, "bevy_pbr::fog::FogFalloff": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::fog::FogFalloff", "oneOf": [ { "additionalProperties": false, + "long_name": "Linear", "properties": { "end": { - "title": "end", + "long_name": "end", "type": { "$ref": "#/$defs/f32" } }, "start": { - "title": "start", + "long_name": "start", "type": { "$ref": "#/$defs/f32" } @@ -6433,15 +7586,15 @@ "end" ], "short_name": "Linear", - "title": "Linear", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Exponential", "properties": { "density": { - "title": "density", + "long_name": "density", "type": { "$ref": "#/$defs/f32" } @@ -6451,15 +7604,15 @@ "density" ], "short_name": "Exponential", - "title": "Exponential", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "ExponentialSquared", "properties": { "density": { - "title": "density", + "long_name": "density", "type": { "$ref": "#/$defs/f32" } @@ -6469,21 +7622,21 @@ "density" ], "short_name": "ExponentialSquared", - "title": "ExponentialSquared", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "Atmospheric", "properties": { "extinction": { - "title": "extinction", + "long_name": "extinction", "type": { "$ref": "#/$defs/glam::Vec3" } }, "inscattering": { - "title": "inscattering", + "long_name": "inscattering", "type": { "$ref": "#/$defs/glam::Vec3" } @@ -6494,13 +7647,11 @@ "inscattering" ], "short_name": "Atmospheric", - "title": "Atmospheric", "type": "object", "typeInfo": "Struct" } ], "short_name": "FogFalloff", - "title": "bevy_pbr::fog::FogFalloff", "type": "object", "typeInfo": "Enum" }, @@ -6508,15 +7659,16 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::fog::FogSettings", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "directional_light_color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "directional_light_exponent": { @@ -6537,32 +7689,6 @@ "falloff" ], "short_name": "FogSettings", - "title": "bevy_pbr::fog::FogSettings", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::AmbientLight": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "properties": { - "brightness": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - }, - "required": [ - "color", - "brightness" - ], - "short_name": "AmbientLight", - "title": "bevy_pbr::light::AmbientLight", "type": "object", "typeInfo": "Struct" }, @@ -6570,8 +7696,14 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::light::Cascade", "properties": { - "projection": { + "clip_from_cascade": { + "type": { + "$ref": "#/$defs/glam::Mat4" + } + }, + "clip_from_world": { "type": { "$ref": "#/$defs/glam::Mat4" } @@ -6581,25 +7713,19 @@ "$ref": "#/$defs/f32" } }, - "view_projection": { - "type": { - "$ref": "#/$defs/glam::Mat4" - } - }, - "view_transform": { + "world_from_cascade": { "type": { "$ref": "#/$defs/glam::Mat4" } } }, "required": [ - "view_transform", - "projection", - "view_projection", + "world_from_cascade", + "clip_from_cascade", + "clip_from_world", "texel_size" ], "short_name": "Cascade", - "title": "bevy_pbr::light::Cascade", "type": "object", "typeInfo": "Struct" }, @@ -6607,6 +7733,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::CascadeShadowConfig", "properties": { "bounds": { "type": { @@ -6630,7 +7757,6 @@ "minimum_distance" ], "short_name": "CascadeShadowConfig", - "title": "bevy_pbr::light::CascadeShadowConfig", "type": "object", "typeInfo": "Struct" }, @@ -6638,6 +7764,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::Cascades", "properties": { "cascades": { "type": { @@ -6649,157 +7776,116 @@ "cascades" ], "short_name": "Cascades", - "title": "bevy_pbr::light::Cascades", "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::ClusterConfig": { - "isComponent": true, - "isResource": false, - "oneOf": [ - { - "title": "None" - }, - { - "title": "Single" - }, - { - "additionalProperties": false, - "properties": { - "dimensions": { - "title": "dimensions", - "type": { - "$ref": "#/$defs/glam::UVec3" - } - }, - "dynamic_resizing": { - "title": "dynamic_resizing", - "type": { - "$ref": "#/$defs/bool" - } - }, - "z_config": { - "title": "z_config", - "type": { - "$ref": "#/$defs/bevy_pbr::light::ClusterZConfig" - } - } - }, - "required": [ - "dimensions", - "z_config", - "dynamic_resizing" - ], - "short_name": "XYZ", - "title": "XYZ", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "dynamic_resizing": { - "title": "dynamic_resizing", - "type": { - "$ref": "#/$defs/bool" - } - }, - "total": { - "title": "total", - "type": { - "$ref": "#/$defs/u32" - } - }, - "z_config": { - "title": "z_config", - "type": { - "$ref": "#/$defs/bevy_pbr::light::ClusterZConfig" - } - }, - "z_slices": { - "title": "z_slices", - "type": { - "$ref": "#/$defs/u32" - } - } - }, - "required": [ - "total", - "z_slices", - "z_config", - "dynamic_resizing" - ], - "short_name": "FixedZ", - "title": "FixedZ", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "ClusterConfig", - "title": "bevy_pbr::light::ClusterConfig", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_pbr::light::ClusterFarZMode": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "title": "MaxLightRange" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "Constant", - "title": "Constant", - "type": "array", - "typeInfo": "Tuple" - } - ], - "short_name": "ClusterFarZMode", - "title": "bevy_pbr::light::ClusterFarZMode", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_pbr::light::ClusterZConfig": { + "bevy_pbr::light::DirectionalLightShadowMap": { "additionalProperties": false, "isComponent": false, - "isResource": false, + "isResource": true, + "long_name": "bevy_pbr::light::DirectionalLightShadowMap", "properties": { - "far_z_mode": { + "size": { "type": { - "$ref": "#/$defs/bevy_pbr::light::ClusterFarZMode" - } - }, - "first_slice_depth": { - "type": { - "$ref": "#/$defs/f32" + "$ref": "#/$defs/usize" } } }, "required": [ - "first_slice_depth", - "far_z_mode" + "size" ], - "short_name": "ClusterZConfig", - "title": "bevy_pbr::light::ClusterZConfig", + "short_name": "DirectionalLightShadowMap", "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::DirectionalLight": { + "bevy_pbr::light::NotShadowCaster": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::NotShadowCaster", + "properties": {}, + "required": [], + "short_name": "NotShadowCaster", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::NotShadowReceiver": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::NotShadowReceiver", + "properties": {}, + "required": [], + "short_name": "NotShadowReceiver", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::PointLightShadowMap": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::PointLightShadowMap", + "properties": { + "size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "size" + ], + "short_name": "PointLightShadowMap", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::ShadowFilteringMethod": { + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::ShadowFilteringMethod", + "oneOf": [ + "Hardware2x2", + "Gaussian", + "Temporal" + ], + "short_name": "ShadowFilteringMethod", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::light::ambient_light::AmbientLight": { + "additionalProperties": false, + "isComponent": false, + "isResource": true, + "long_name": "bevy_pbr::light::ambient_light::AmbientLight", + "properties": { + "brightness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "required": [ + "color", + "brightness" + ], + "short_name": "AmbientLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::light::directional_light::DirectionalLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::light::directional_light::DirectionalLight", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "illuminance": { @@ -6831,59 +7917,18 @@ "shadow_normal_bias" ], "short_name": "DirectionalLight", - "title": "bevy_pbr::light::DirectionalLight", "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::DirectionalLightShadowMap": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "properties": { - "size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "size" - ], - "short_name": "DirectionalLightShadowMap", - "title": "bevy_pbr::light::DirectionalLightShadowMap", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::NotShadowCaster": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "NotShadowCaster", - "title": "bevy_pbr::light::NotShadowCaster", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::NotShadowReceiver": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "NotShadowReceiver", - "title": "bevy_pbr::light::NotShadowReceiver", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::PointLight": { + "bevy_pbr::light::point_light::PointLight": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::point_light::PointLight", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "intensity": { @@ -6927,50 +7972,18 @@ "shadow_normal_bias" ], "short_name": "PointLight", - "title": "bevy_pbr::light::PointLight", "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::light::PointLightShadowMap": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "properties": { - "size": { - "type": { - "$ref": "#/$defs/usize" - } - } - }, - "required": [ - "size" - ], - "short_name": "PointLightShadowMap", - "title": "bevy_pbr::light::PointLightShadowMap", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::light::ShadowFilteringMethod": { - "isComponent": true, - "isResource": false, - "oneOf": [ - "Hardware2x2", - "Castano13", - "Jimenez14" - ], - "short_name": "ShadowFilteringMethod", - "title": "bevy_pbr::light::ShadowFilteringMethod", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_pbr::light::SpotLight": { + "bevy_pbr::light::spot_light::SpotLight": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light::spot_light::SpotLight", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "inner_angle": { @@ -7026,7 +8039,6 @@ "inner_angle" ], "short_name": "SpotLight", - "title": "bevy_pbr::light::SpotLight", "type": "object", "typeInfo": "Struct" }, @@ -7034,10 +8046,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::light_probe::LightProbe", "properties": {}, "required": [], "short_name": "LightProbe", - "title": "bevy_pbr::light_probe::LightProbe", "type": "object", "typeInfo": "Struct" }, @@ -7045,6 +8057,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", "properties": { "diffuse_map": { "type": { @@ -7068,7 +8081,6 @@ "intensity" ], "short_name": "EnvironmentMapLight", - "title": "bevy_pbr::light_probe::environment_map::EnvironmentMapLight", "type": "object", "typeInfo": "Struct" }, @@ -7076,6 +8088,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", "properties": { "intensity": { "type": { @@ -7093,7 +8106,6 @@ "intensity" ], "short_name": "IrradianceVolume", - "title": "bevy_pbr::light_probe::irradiance_volume::IrradianceVolume", "type": "object", "typeInfo": "Struct" }, @@ -7101,6 +8113,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_pbr::material::DefaultOpaqueRendererMethod", "prefixItems": [ { "type": { @@ -7109,35 +8122,36 @@ } ], "short_name": "DefaultOpaqueRendererMethod", - "title": "bevy_pbr::material::DefaultOpaqueRendererMethod", "type": "array", "typeInfo": "TupleStruct" }, "bevy_pbr::material::OpaqueRendererMethod": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::material::OpaqueRendererMethod", "oneOf": [ "Forward", "Deferred", "Auto" ], "short_name": "OpaqueRendererMethod", - "title": "bevy_pbr::material::OpaqueRendererMethod", "type": "string", "typeInfo": "Enum" }, "bevy_pbr::parallax::ParallaxMappingMethod": { "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::parallax::ParallaxMappingMethod", "oneOf": [ { - "title": "Occlusion" + "long_name": "Occlusion" }, { "additionalProperties": false, + "long_name": "Relief", "properties": { "max_steps": { - "title": "max_steps", + "long_name": "max_steps", "type": { "$ref": "#/$defs/u32" } @@ -7147,13 +8161,11 @@ "max_steps" ], "short_name": "Relief", - "title": "Relief", "type": "object", "typeInfo": "Struct" } ], "short_name": "ParallaxMappingMethod", - "title": "bevy_pbr::parallax::ParallaxMappingMethod", "type": "object", "typeInfo": "Enum" }, @@ -7161,15 +8173,26 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_pbr::pbr_material::StandardMaterial", "properties": { "alpha_mode": { "type": { - "$ref": "#/$defs/bevy_pbr::alpha::AlphaMode" + "$ref": "#/$defs/bevy_render::alpha::AlphaMode" + } + }, + "anisotropy_rotation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "anisotropy_strength": { + "type": { + "$ref": "#/$defs/f32" } }, "attenuation_color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "attenuation_distance": { @@ -7179,7 +8202,12 @@ }, "base_color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "base_color_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" } }, "base_color_texture": { @@ -7187,6 +8215,16 @@ "$ref": "#/$defs/core::option::Option>" } }, + "clearcoat": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "clearcoat_perceptual_roughness": { + "type": { + "$ref": "#/$defs/f32" + } + }, "deferred_lighting_pass_id": { "type": { "$ref": "#/$defs/u8" @@ -7214,7 +8252,17 @@ }, "emissive": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::linear_rgba::LinearRgba" + } + }, + "emissive_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, + "emissive_exposure_weight": { + "type": { + "$ref": "#/$defs/f32" } }, "emissive_texture": { @@ -7252,16 +8300,31 @@ "$ref": "#/$defs/f32" } }, + "metallic_roughness_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, "metallic_roughness_texture": { "type": { "$ref": "#/$defs/core::option::Option>" } }, + "normal_map_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, "normal_map_texture": { "type": { "$ref": "#/$defs/core::option::Option>" } }, + "occlusion_channel": { + "type": { + "$ref": "#/$defs/bevy_pbr::pbr_material::UvChannel" + } + }, "occlusion_texture": { "type": { "$ref": "#/$defs/core::option::Option>" @@ -7306,13 +8369,22 @@ "type": { "$ref": "#/$defs/bool" } + }, + "uv_transform": { + "type": { + "$ref": "#/$defs/glam::Affine2" + } } }, "required": [ "base_color", + "base_color_channel", "emissive", + "emissive_exposure_weight", + "emissive_channel", "perceptual_roughness", "metallic", + "metallic_roughness_channel", "reflectance", "diffuse_transmission", "specular_transmission", @@ -7320,7 +8392,13 @@ "ior", "attenuation_distance", "attenuation_color", + "normal_map_channel", "flip_normal_map_y", + "occlusion_channel", + "clearcoat", + "clearcoat_perceptual_roughness", + "anisotropy_strength", + "anisotropy_rotation", "double_sided", "unlit", "fog_enabled", @@ -7331,17 +8409,77 @@ "max_parallax_layer_count", "lightmap_exposure", "opaque_render_method", - "deferred_lighting_pass_id" + "deferred_lighting_pass_id", + "uv_transform" ], "short_name": "StandardMaterial", - "title": "bevy_pbr::pbr_material::StandardMaterial", "type": "object", "typeInfo": "Struct" }, + "bevy_pbr::pbr_material::UvChannel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::pbr_material::UvChannel", + "oneOf": [ + "Uv0", + "Uv1" + ], + "short_name": "UvChannel", + "type": "string", + "typeInfo": "Enum" + }, + "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel", + "oneOf": [ + { + "long_name": "Low" + }, + { + "long_name": "Medium" + }, + { + "long_name": "High" + }, + { + "long_name": "Ultra" + }, + { + "additionalProperties": false, + "long_name": "Custom", + "properties": { + "samples_per_slice_side": { + "long_name": "samples_per_slice_side", + "type": { + "$ref": "#/$defs/u32" + } + }, + "slice_count": { + "long_name": "slice_count", + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "slice_count", + "samples_per_slice_side" + ], + "short_name": "Custom", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "ScreenSpaceAmbientOcclusionQualityLevel", + "type": "object", + "typeInfo": "Enum" + }, "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings", "properties": { "quality_level": { "type": { @@ -7353,82 +8491,159 @@ "quality_level" ], "short_name": "ScreenSpaceAmbientOcclusionSettings", - "title": "bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings", "type": "object", "typeInfo": "Struct" }, - "bevy_pbr::wireframe::NoWireframe": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "NoWireframe", - "title": "bevy_pbr::wireframe::NoWireframe", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::wireframe::Wireframe": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Wireframe", - "title": "bevy_pbr::wireframe::Wireframe", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::wireframe::WireframeColor": { + "bevy_pbr::ssr::ScreenSpaceReflectionsSettings": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::ssr::ScreenSpaceReflectionsSettings", "properties": { - "color": { + "bisection_steps": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" - } - } - }, - "required": [ - "color" - ], - "short_name": "WireframeColor", - "title": "bevy_pbr::wireframe::WireframeColor", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_pbr::wireframe::WireframeConfig": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "properties": { - "default_color": { - "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/u32" } }, - "global": { + "linear_march_exponent": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "linear_steps": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "perceptual_roughness_threshold": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "thickness": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "use_secant": { "type": { "$ref": "#/$defs/bool" } } }, "required": [ - "global", - "default_color" + "perceptual_roughness_threshold", + "thickness", + "linear_steps", + "linear_march_exponent", + "bisection_steps", + "use_secant" ], - "short_name": "WireframeConfig", - "title": "bevy_pbr::wireframe::WireframeConfig", + "short_name": "ScreenSpaceReflectionsSettings", "type": "object", "typeInfo": "Struct" }, - "bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties": { + "bevy_pbr::volumetric_fog::VolumetricFogSettings": { + "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricFogSettings", + "properties": { + "absorption": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "ambient_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "ambient_intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "density": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "fog_color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "light_intensity": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "light_tint": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "max_depth": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scattering": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "scattering_asymmetry": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "step_count": { + "type": { + "$ref": "#/$defs/u32" + } + } + }, + "required": [ + "fog_color", + "ambient_color", + "ambient_intensity", + "step_count", + "max_depth", + "absorption", + "scattering", + "density", + "scattering_asymmetry", + "light_tint", + "light_intensity" + ], + "short_name": "VolumetricFogSettings", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_pbr::volumetric_fog::VolumetricLight": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_pbr::volumetric_fog::VolumetricLight", + "properties": {}, + "required": [], + "short_name": "VolumetricLight", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::alpha::AlphaMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::alpha::AlphaMode", "oneOf": [ + { + "long_name": "Opaque" + }, { "items": false, + "long_name": "Mask", "prefixItems": [ { "type": { @@ -7436,465 +8651,35 @@ } } ], - "short_name": "Mass", - "title": "Mass", + "short_name": "Mask", "type": "array", "typeInfo": "Tuple" }, { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::rigid_body::MassProperties" - } - } - ], - "short_name": "MassProperties", - "title": "MassProperties", - "type": "array", - "typeInfo": "Tuple" + "long_name": "Blend" + }, + { + "long_name": "Premultiplied" + }, + { + "long_name": "AlphaToCoverage" + }, + { + "long_name": "Add" + }, + { + "long_name": "Multiply" } ], - "short_name": "AdditionalMassProperties", - "title": "bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties", + "short_name": "AlphaMode", "type": "object", "typeInfo": "Enum" }, - "bevy_rapier3d::dynamics::rigid_body::Ccd": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled" - ], - "short_name": "Ccd", - "title": "bevy_rapier3d::dynamics::rigid_body::Ccd", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Damping": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "angular_damping": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "linear_damping": { - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "linear_damping", - "angular_damping" - ], - "short_name": "Damping", - "title": "bevy_rapier3d::dynamics::rigid_body::Damping", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Dominance": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "groups": { - "type": { - "$ref": "#/$defs/i8" - } - } - }, - "required": [ - "groups" - ], - "short_name": "Dominance", - "title": "bevy_rapier3d::dynamics::rigid_body::Dominance", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::ExternalForce": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "force": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "torque": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "force", - "torque" - ], - "short_name": "ExternalForce", - "title": "bevy_rapier3d::dynamics::rigid_body::ExternalForce", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::ExternalImpulse": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "impulse": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "torque_impulse": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "impulse", - "torque_impulse" - ], - "short_name": "ExternalImpulse", - "title": "bevy_rapier3d::dynamics::rigid_body::ExternalImpulse", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::GravityScale": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "GravityScale", - "title": "bevy_rapier3d::dynamics::rigid_body::GravityScale", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::dynamics::rigid_body::LockedAxes": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u8" - } - } - ], - "short_name": "LockedAxes", - "title": "bevy_rapier3d::dynamics::rigid_body::LockedAxes", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::dynamics::rigid_body::MassProperties": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "local_center_of_mass": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "mass": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "principal_inertia": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "principal_inertia_local_frame": { - "type": { - "$ref": "#/$defs/glam::Quat" - } - } - }, - "required": [ - "local_center_of_mass", - "mass", - "principal_inertia_local_frame", - "principal_inertia" - ], - "short_name": "MassProperties", - "title": "bevy_rapier3d::dynamics::rigid_body::MassProperties", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::RigidBody": { - "isComponent": true, - "isResource": false, - "oneOf": [ - "Dynamic", - "Fixed", - "KinematicPositionBased", - "KinematicVelocityBased" - ], - "short_name": "RigidBody", - "title": "bevy_rapier3d::dynamics::rigid_body::RigidBody", - "type": "string", - "typeInfo": "Enum" - }, - "bevy_rapier3d::dynamics::rigid_body::Sleeping": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "angular_threshold": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "linear_threshold": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "sleeping": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "linear_threshold", - "angular_threshold", - "sleeping" - ], - "short_name": "Sleeping", - "title": "bevy_rapier3d::dynamics::rigid_body::Sleeping", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::dynamics::rigid_body::Velocity": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "angvel": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "linvel": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "linvel", - "angvel" - ], - "short_name": "Velocity", - "title": "bevy_rapier3d::dynamics::rigid_body::Velocity", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::CollidingEntities": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_utils::HashSet" - } - } - ], - "short_name": "CollidingEntities", - "title": "bevy_rapier3d::geometry::collider::CollidingEntities", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::CollisionGroups": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "filters": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - }, - "memberships": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - } - }, - "required": [ - "memberships", - "filters" - ], - "short_name": "CollisionGroups", - "title": "bevy_rapier3d::geometry::collider::CollisionGroups", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::ContactForceEventThreshold": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/f32" - } - } - ], - "short_name": "ContactForceEventThreshold", - "title": "bevy_rapier3d::geometry::collider::ContactForceEventThreshold", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::Friction": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "coefficient": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "combine_rule": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::CoefficientCombineRule" - } - } - }, - "required": [ - "coefficient", - "combine_rule" - ], - "short_name": "Friction", - "title": "bevy_rapier3d::geometry::collider::Friction", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::Group": { - "isComponent": true, - "isResource": false, - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/u32" - } - } - ], - "short_name": "Group", - "title": "bevy_rapier3d::geometry::collider::Group", - "type": "array", - "typeInfo": "TupleStruct" - }, - "bevy_rapier3d::geometry::collider::Restitution": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "coefficient": { - "type": { - "$ref": "#/$defs/f32" - } - }, - "combine_rule": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::dynamics::CoefficientCombineRule" - } - } - }, - "required": [ - "coefficient", - "combine_rule" - ], - "short_name": "Restitution", - "title": "bevy_rapier3d::geometry::collider::Restitution", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::Sensor": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": {}, - "required": [], - "short_name": "Sensor", - "title": "bevy_rapier3d::geometry::collider::Sensor", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::geometry::collider::SolverGroups": { - "additionalProperties": false, - "isComponent": true, - "isResource": false, - "properties": { - "filters": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - }, - "memberships": { - "type": { - "$ref": "#/$defs/bevy_rapier3d::geometry::collider::Group" - } - } - }, - "required": [ - "memberships", - "filters" - ], - "short_name": "SolverGroups", - "title": "bevy_rapier3d::geometry::collider::SolverGroups", - "type": "object", - "typeInfo": "Struct" - }, - "bevy_rapier3d::render::DebugRenderContext": { - "additionalProperties": false, - "isComponent": false, - "isResource": true, - "properties": { - "enabled": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "enabled" - ], - "short_name": "DebugRenderContext", - "title": "bevy_rapier3d::render::DebugRenderContext", - "type": "object", - "typeInfo": "Struct" - }, "bevy_render::camera::camera::Camera": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::Camera", "properties": { "clear_color": { "type": { @@ -7935,90 +8720,73 @@ "clear_color" ], "short_name": "Camera", - "title": "bevy_render::camera::camera::Camera", "type": "object", "typeInfo": "Struct" }, "bevy_render::camera::camera::CameraMainTextureUsages": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::CameraMainTextureUsages", "short_name": "CameraMainTextureUsages", - "title": "bevy_render::camera::camera::CameraMainTextureUsages", "type": "object", "typeInfo": "Value" }, "bevy_render::camera::camera::CameraRenderGraph": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::CameraRenderGraph", "short_name": "CameraRenderGraph", - "title": "bevy_render::camera::camera::CameraRenderGraph", "type": "object", "typeInfo": "Value" }, "bevy_render::camera::camera::Exposure": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::camera::Exposure", "short_name": "Exposure", - "title": "bevy_render::camera::camera::Exposure", "type": "object", "typeInfo": "Value" }, - "bevy_render::camera::camera::RenderTarget": { - "isComponent": false, + "bevy_render::camera::camera::MipBias": { + "isComponent": true, "isResource": false, - "oneOf": [ + "items": false, + "long_name": "bevy_render::camera::camera::MipBias", + "prefixItems": [ { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_window::window::WindowRef" - } - } - ], - "short_name": "Window", - "title": "Window", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_asset::handle::Handle" - } - } - ], - "short_name": "Image", - "title": "Image", - "type": "array", - "typeInfo": "Tuple" - }, - { - "items": false, - "prefixItems": [ - { - "type": { - "$ref": "#/$defs/bevy_render::camera::manual_texture_view::ManualTextureViewHandle" - } - } - ], - "short_name": "TextureView", - "title": "TextureView", - "type": "array", - "typeInfo": "Tuple" + "type": { + "$ref": "#/$defs/f32" + } } ], - "short_name": "RenderTarget", - "title": "bevy_render::camera::camera::RenderTarget", + "short_name": "MipBias", + "type": "array", + "typeInfo": "TupleStruct" + }, + "bevy_render::camera::camera::TemporalJitter": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_render::camera::camera::TemporalJitter", + "properties": { + "offset": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "offset" + ], + "short_name": "TemporalJitter", "type": "object", - "typeInfo": "Enum" + "typeInfo": "Struct" }, "bevy_render::camera::camera::Viewport": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::camera::camera::Viewport", "properties": { "depth": { "type": { @@ -8042,7 +8810,6 @@ "depth" ], "short_name": "Viewport", - "title": "bevy_render::camera::camera::Viewport", "type": "object", "typeInfo": "Struct" }, @@ -8050,45 +8817,45 @@ "isComponent": false, "isResource": true, "items": false, + "long_name": "bevy_render::camera::clear_color::ClearColor", "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], "short_name": "ClearColor", - "title": "bevy_render::camera::clear_color::ClearColor", "type": "array", "typeInfo": "TupleStruct" }, "bevy_render::camera::clear_color::ClearColorConfig": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::camera::clear_color::ClearColorConfig", "oneOf": [ { - "title": "Default" + "long_name": "Default" }, { "items": false, + "long_name": "Custom", "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], "short_name": "Custom", - "title": "Custom", "type": "array", "typeInfo": "Tuple" }, { - "title": "None" + "long_name": "None" } ], "short_name": "ClearColorConfig", - "title": "bevy_render::camera::clear_color::ClearColorConfig", "type": "object", "typeInfo": "Enum" }, @@ -8096,10 +8863,11 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::projection::OrthographicProjection", "properties": { "area": { "type": { - "$ref": "#/$defs/bevy_math::Rect" + "$ref": "#/$defs/bevy_math::rects::rect::Rect" } }, "far": { @@ -8137,7 +8905,6 @@ "area" ], "short_name": "OrthographicProjection", - "title": "bevy_render::camera::projection::OrthographicProjection", "type": "object", "typeInfo": "Struct" }, @@ -8145,6 +8912,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::projection::PerspectiveProjection", "properties": { "aspect_ratio": { "type": { @@ -8174,16 +8942,17 @@ "far" ], "short_name": "PerspectiveProjection", - "title": "bevy_render::camera::projection::PerspectiveProjection", "type": "object", "typeInfo": "Struct" }, "bevy_render::camera::projection::Projection": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::camera::projection::Projection", "oneOf": [ { "items": false, + "long_name": "Perspective", "prefixItems": [ { "type": { @@ -8192,12 +8961,12 @@ } ], "short_name": "Perspective", - "title": "Perspective", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Orthographic", "prefixItems": [ { "type": { @@ -8206,31 +8975,31 @@ } ], "short_name": "Orthographic", - "title": "Orthographic", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Projection", - "title": "bevy_render::camera::projection::Projection", "type": "object", "typeInfo": "Enum" }, "bevy_render::camera::projection::ScalingMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::camera::projection::ScalingMode", "oneOf": [ { "additionalProperties": false, + "long_name": "Fixed", "properties": { "height": { - "title": "height", + "long_name": "height", "type": { "$ref": "#/$defs/f32" } }, "width": { - "title": "width", + "long_name": "width", "type": { "$ref": "#/$defs/f32" } @@ -8241,12 +9010,12 @@ "height" ], "short_name": "Fixed", - "title": "Fixed", "type": "object", "typeInfo": "Struct" }, { "items": false, + "long_name": "WindowSize", "prefixItems": [ { "type": { @@ -8255,21 +9024,21 @@ } ], "short_name": "WindowSize", - "title": "WindowSize", "type": "array", "typeInfo": "Tuple" }, { "additionalProperties": false, + "long_name": "AutoMin", "properties": { "min_height": { - "title": "min_height", + "long_name": "min_height", "type": { "$ref": "#/$defs/f32" } }, "min_width": { - "title": "min_width", + "long_name": "min_width", "type": { "$ref": "#/$defs/f32" } @@ -8280,21 +9049,21 @@ "min_height" ], "short_name": "AutoMin", - "title": "AutoMin", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "AutoMax", "properties": { "max_height": { - "title": "max_height", + "long_name": "max_height", "type": { "$ref": "#/$defs/f32" } }, "max_width": { - "title": "max_width", + "long_name": "max_width", "type": { "$ref": "#/$defs/f32" } @@ -8305,12 +9074,12 @@ "max_height" ], "short_name": "AutoMax", - "title": "AutoMax", "type": "object", "typeInfo": "Struct" }, { "items": false, + "long_name": "FixedVertical", "prefixItems": [ { "type": { @@ -8319,12 +9088,12 @@ } ], "short_name": "FixedVertical", - "title": "FixedVertical", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "FixedHorizontal", "prefixItems": [ { "type": { @@ -8333,179 +9102,11 @@ } ], "short_name": "FixedHorizontal", - "title": "FixedHorizontal", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ScalingMode", - "title": "bevy_render::camera::projection::ScalingMode", - "type": "object", - "typeInfo": "Enum" - }, - "bevy_render::color::Color": { - "isComponent": false, - "isResource": false, - "oneOf": [ - { - "additionalProperties": false, - "properties": { - "alpha": { - "title": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "blue": { - "title": "blue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "green": { - "title": "green", - "type": { - "$ref": "#/$defs/f32" - } - }, - "red": { - "title": "red", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "short_name": "Rgba", - "title": "Rgba", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "alpha": { - "title": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "blue": { - "title": "blue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "green": { - "title": "green", - "type": { - "$ref": "#/$defs/f32" - } - }, - "red": { - "title": "red", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "short_name": "RgbaLinear", - "title": "RgbaLinear", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "alpha": { - "title": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "hue": { - "title": "hue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "lightness": { - "title": "lightness", - "type": { - "$ref": "#/$defs/f32" - } - }, - "saturation": { - "title": "saturation", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "hue", - "saturation", - "lightness", - "alpha" - ], - "short_name": "Hsla", - "title": "Hsla", - "type": "object", - "typeInfo": "Struct" - }, - { - "additionalProperties": false, - "properties": { - "alpha": { - "title": "alpha", - "type": { - "$ref": "#/$defs/f32" - } - }, - "chroma": { - "title": "chroma", - "type": { - "$ref": "#/$defs/f32" - } - }, - "hue": { - "title": "hue", - "type": { - "$ref": "#/$defs/f32" - } - }, - "lightness": { - "title": "lightness", - "type": { - "$ref": "#/$defs/f32" - } - } - }, - "required": [ - "lightness", - "chroma", - "hue", - "alpha" - ], - "short_name": "Lcha", - "title": "Lcha", - "type": "object", - "typeInfo": "Struct" - } - ], - "short_name": "Color", - "title": "bevy_render::color::Color", "type": "object", "typeInfo": "Enum" }, @@ -8513,6 +9114,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_render::globals::GlobalsUniform", "properties": { "delta_time": { "type": { @@ -8536,16 +9138,17 @@ "frame_count" ], "short_name": "GlobalsUniform", - "title": "bevy_render::globals::GlobalsUniform", "type": "object", "typeInfo": "Struct" }, "bevy_render::mesh::mesh::Indices": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::mesh::mesh::Indices", "oneOf": [ { "items": false, + "long_name": "U16", "prefixItems": [ { "type": { @@ -8554,12 +9157,12 @@ } ], "short_name": "U16", - "title": "U16", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "U32", "prefixItems": [ { "type": { @@ -8568,13 +9171,11 @@ } ], "short_name": "U32", - "title": "U32", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Indices", - "title": "bevy_render::mesh::mesh::Indices", "type": "object", "typeInfo": "Enum" }, @@ -8582,6 +9183,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_render::mesh::mesh::Mesh", "properties": { "asset_usage": { "type": { @@ -8608,7 +9210,6 @@ "asset_usage" ], "short_name": "Mesh", - "title": "bevy_render::mesh::mesh::Mesh", "type": "object", "typeInfo": "Struct" }, @@ -8616,6 +9217,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::mesh::mesh::skinning::SkinnedMesh", "properties": { "inverse_bindposes": { "type": { @@ -8633,7 +9235,6 @@ "joints" ], "short_name": "SkinnedMesh", - "title": "bevy_render::mesh::mesh::skinning::SkinnedMesh", "type": "object", "typeInfo": "Struct" }, @@ -8641,6 +9242,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::mesh::morph::MeshMorphWeights", "properties": { "weights": { "type": { @@ -8652,7 +9254,6 @@ "weights" ], "short_name": "MeshMorphWeights", - "title": "bevy_render::mesh::morph::MeshMorphWeights", "type": "object", "typeInfo": "Struct" }, @@ -8660,6 +9261,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::mesh::morph::MorphWeights", "properties": { "first_mesh": { "type": { @@ -8676,7 +9278,6 @@ "weights" ], "short_name": "MorphWeights", - "title": "bevy_render::mesh::morph::MorphWeights", "type": "object", "typeInfo": "Struct" }, @@ -8684,6 +9285,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::Aabb", "properties": { "center": { "type": { @@ -8701,7 +9303,6 @@ "half_extents" ], "short_name": "Aabb", - "title": "bevy_render::primitives::Aabb", "type": "object", "typeInfo": "Struct" }, @@ -8709,10 +9310,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::CascadesFrusta", "properties": {}, "required": [], "short_name": "CascadesFrusta", - "title": "bevy_render::primitives::CascadesFrusta", "type": "object", "typeInfo": "Struct" }, @@ -8720,10 +9321,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::CubemapFrusta", "properties": {}, "required": [], "short_name": "CubemapFrusta", - "title": "bevy_render::primitives::CubemapFrusta", "type": "object", "typeInfo": "Struct" }, @@ -8731,18 +9332,26 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::primitives::Frustum", "properties": {}, "required": [], "short_name": "Frustum", - "title": "bevy_render::primitives::Frustum", "type": "object", "typeInfo": "Struct" }, + "bevy_render::render_asset::RenderAssetUsages": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::render_asset::RenderAssetUsages", + "short_name": "RenderAssetUsages", + "type": "object", + "typeInfo": "Value" + }, "bevy_render::texture::image::Image": { "isComponent": false, "isResource": false, + "long_name": "bevy_render::texture::image::Image", "short_name": "Image", - "title": "bevy_render::texture::image::Image", "type": "object", "typeInfo": "Value" }, @@ -8750,42 +9359,135 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::ColorGrading", + "properties": { + "global": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingGlobal" + } + }, + "highlights": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + }, + "midtones": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + }, + "shadows": { + "type": { + "$ref": "#/$defs/bevy_render::view::ColorGradingSection" + } + } + }, + "required": [ + "global", + "shadows", + "midtones", + "highlights" + ], + "short_name": "ColorGrading", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::ColorGradingGlobal": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::ColorGradingGlobal", "properties": { "exposure": { "type": { "$ref": "#/$defs/f32" } }, + "hue": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "midtones_range": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "post_saturation": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "temperature": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "tint": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "exposure", + "temperature", + "tint", + "hue", + "post_saturation", + "midtones_range" + ], + "short_name": "ColorGradingGlobal", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::ColorGradingSection": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::ColorGradingSection", + "properties": { + "contrast": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gain": { + "type": { + "$ref": "#/$defs/f32" + } + }, "gamma": { "type": { "$ref": "#/$defs/f32" } }, - "post_saturation": { + "lift": { "type": { "$ref": "#/$defs/f32" } }, - "pre_saturation": { + "saturation": { "type": { "$ref": "#/$defs/f32" } } }, "required": [ - "exposure", + "saturation", + "contrast", "gamma", - "pre_saturation", - "post_saturation" + "gain", + "lift" ], - "short_name": "ColorGrading", - "title": "bevy_render::view::ColorGrading", + "short_name": "ColorGradingSection", "type": "object", "typeInfo": "Struct" }, "bevy_render::view::Msaa": { "isComponent": false, "isResource": true, + "long_name": "bevy_render::view::Msaa", "oneOf": [ "Off", "Sample2", @@ -8793,7 +9495,6 @@ "Sample8" ], "short_name": "Msaa", - "title": "bevy_render::view::Msaa", "type": "string", "typeInfo": "Enum" }, @@ -8801,6 +9502,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::view::visibility::InheritedVisibility", "prefixItems": [ { "type": { @@ -8809,7 +9511,6 @@ } ], "short_name": "InheritedVisibility", - "title": "bevy_render::view::visibility::InheritedVisibility", "type": "array", "typeInfo": "TupleStruct" }, @@ -8817,10 +9518,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::visibility::NoFrustumCulling", "properties": {}, "required": [], "short_name": "NoFrustumCulling", - "title": "bevy_render::view::visibility::NoFrustumCulling", "type": "object", "typeInfo": "Struct" }, @@ -8828,6 +9529,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::view::visibility::ViewVisibility", "prefixItems": [ { "type": { @@ -8836,20 +9538,19 @@ } ], "short_name": "ViewVisibility", - "title": "bevy_render::view::visibility::ViewVisibility", "type": "array", "typeInfo": "TupleStruct" }, "bevy_render::view::visibility::Visibility": { "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::visibility::Visibility", "oneOf": [ "Inherited", "Hidden", "Visible" ], "short_name": "Visibility", - "title": "bevy_render::view::visibility::Visibility", "type": "string", "typeInfo": "Enum" }, @@ -8857,10 +9558,35 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_render::view::visibility::VisibleEntities", "properties": {}, "required": [], "short_name": "VisibleEntities", - "title": "bevy_render::view::visibility::VisibleEntities", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_render::view::visibility::range::VisibilityRange": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_render::view::visibility::range::VisibilityRange", + "properties": { + "end_margin": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + }, + "start_margin": { + "type": { + "$ref": "#/$defs/core::ops::Range" + } + } + }, + "required": [ + "start_margin", + "end_margin" + ], + "short_name": "VisibilityRange", "type": "object", "typeInfo": "Struct" }, @@ -8868,26 +9594,38 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_render::view::visibility::render_layers::RenderLayers", "prefixItems": [ { "type": { - "$ref": "#/$defs/u32" + "$ref": "#/$defs/smallvec::SmallVec<[u64; 1]>" } } ], "short_name": "RenderLayers", - "title": "bevy_render::view::visibility::render_layers::RenderLayers", "type": "array", "typeInfo": "TupleStruct" }, + "bevy_sprite::SpriteSource": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "bevy_sprite::SpriteSource", + "properties": {}, + "required": [], + "short_name": "SpriteSource", + "type": "object", + "typeInfo": "Struct" + }, "bevy_sprite::mesh2d::color_material::ColorMaterial": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::mesh2d::color_material::ColorMaterial", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "texture": { @@ -8900,7 +9638,6 @@ "color" ], "short_name": "ColorMaterial", - "title": "bevy_sprite::mesh2d::color_material::ColorMaterial", "type": "object", "typeInfo": "Struct" }, @@ -8908,6 +9645,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_sprite::mesh2d::mesh::Mesh2dHandle", "prefixItems": [ { "type": { @@ -8916,43 +9654,44 @@ } ], "short_name": "Mesh2dHandle", - "title": "bevy_sprite::mesh2d::mesh::Mesh2dHandle", "type": "array", "typeInfo": "TupleStruct" }, "bevy_sprite::sprite::Anchor": { "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::sprite::Anchor", "oneOf": [ { - "title": "Center" + "long_name": "Center" }, { - "title": "BottomLeft" + "long_name": "BottomLeft" }, { - "title": "BottomCenter" + "long_name": "BottomCenter" }, { - "title": "BottomRight" + "long_name": "BottomRight" }, { - "title": "CenterLeft" + "long_name": "CenterLeft" }, { - "title": "CenterRight" + "long_name": "CenterRight" }, { - "title": "TopLeft" + "long_name": "TopLeft" }, { - "title": "TopCenter" + "long_name": "TopCenter" }, { - "title": "TopRight" + "long_name": "TopRight" }, { "items": false, + "long_name": "Custom", "prefixItems": [ { "type": { @@ -8961,22 +9700,22 @@ } ], "short_name": "Custom", - "title": "Custom", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Anchor", - "title": "bevy_sprite::sprite::Anchor", "type": "object", "typeInfo": "Enum" }, "bevy_sprite::sprite::ImageScaleMode": { "isComponent": true, "isResource": false, + "long_name": "bevy_sprite::sprite::ImageScaleMode", "oneOf": [ { "items": false, + "long_name": "Sliced", "prefixItems": [ { "type": { @@ -8985,27 +9724,27 @@ } ], "short_name": "Sliced", - "title": "Sliced", "type": "array", "typeInfo": "Tuple" }, { "additionalProperties": false, + "long_name": "Tiled", "properties": { "stretch_value": { - "title": "stretch_value", + "long_name": "stretch_value", "type": { "$ref": "#/$defs/f32" } }, "tile_x": { - "title": "tile_x", + "long_name": "tile_x", "type": { "$ref": "#/$defs/bool" } }, "tile_y": { - "title": "tile_y", + "long_name": "tile_y", "type": { "$ref": "#/$defs/bool" } @@ -9017,13 +9756,11 @@ "stretch_value" ], "short_name": "Tiled", - "title": "Tiled", "type": "object", "typeInfo": "Struct" } ], "short_name": "ImageScaleMode", - "title": "bevy_sprite::sprite::ImageScaleMode", "type": "object", "typeInfo": "Enum" }, @@ -9031,6 +9768,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_sprite::sprite::Sprite", "properties": { "anchor": { "type": { @@ -9039,7 +9777,7 @@ }, "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "custom_size": { @@ -9059,7 +9797,7 @@ }, "rect": { "type": { - "$ref": "#/$defs/core::option::Option" + "$ref": "#/$defs/core::option::Option" } } }, @@ -9070,7 +9808,6 @@ "anchor" ], "short_name": "Sprite", - "title": "bevy_sprite::sprite::Sprite", "type": "object", "typeInfo": "Struct" }, @@ -9078,6 +9815,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_atlas::TextureAtlas", "properties": { "index": { "type": { @@ -9095,7 +9833,6 @@ "index" ], "short_name": "TextureAtlas", - "title": "bevy_sprite::texture_atlas::TextureAtlas", "type": "object", "typeInfo": "Struct" }, @@ -9103,10 +9840,11 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_atlas::TextureAtlasLayout", "properties": { "size": { "type": { - "$ref": "#/$defs/glam::Vec2" + "$ref": "#/$defs/glam::UVec2" } }, "texture_handles": { @@ -9116,7 +9854,7 @@ }, "textures": { "type": { - "$ref": "#/$defs/alloc::vec::Vec" + "$ref": "#/$defs/alloc::vec::Vec" } } }, @@ -9125,14 +9863,82 @@ "textures" ], "short_name": "TextureAtlasLayout", - "title": "bevy_sprite::texture_atlas::TextureAtlasLayout", "type": "object", "typeInfo": "Struct" }, + "bevy_sprite::texture_slice::border_rect::BorderRect": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::border_rect::BorderRect", + "properties": { + "bottom": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "left": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "right": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "top": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "left", + "right", + "top", + "bottom" + ], + "short_name": "BorderRect", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_sprite::texture_slice::slicer::SliceScaleMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::SliceScaleMode", + "oneOf": [ + { + "long_name": "Stretch" + }, + { + "additionalProperties": false, + "long_name": "Tile", + "properties": { + "stretch_value": { + "long_name": "stretch_value", + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "stretch_value" + ], + "short_name": "Tile", + "type": "object", + "typeInfo": "Struct" + } + ], + "short_name": "SliceScaleMode", + "type": "object", + "typeInfo": "Enum" + }, "bevy_sprite::texture_slice::slicer::TextureSlicer": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_sprite::texture_slice::slicer::TextureSlicer", "properties": { "border": { "type": { @@ -9162,7 +9968,80 @@ "max_corner_scale" ], "short_name": "TextureSlicer", - "title": "bevy_sprite::texture_slice::slicer::TextureSlicer", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::font_atlas_set::GlyphAtlasInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::font_atlas_set::GlyphAtlasInfo", + "properties": { + "glyph_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "texture": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "texture_atlas": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "required": [ + "texture_atlas", + "texture", + "glyph_index" + ], + "short_name": "GlyphAtlasInfo", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_text::glyph_brush::PositionedGlyph": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_text::glyph_brush::PositionedGlyph", + "properties": { + "atlas_info": { + "type": { + "$ref": "#/$defs/bevy_text::font_atlas_set::GlyphAtlasInfo" + } + }, + "byte_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "position": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + }, + "section_index": { + "type": { + "$ref": "#/$defs/usize" + } + }, + "size": { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + }, + "required": [ + "position", + "size", + "atlas_info", + "section_index", + "byte_index" + ], + "short_name": "PositionedGlyph", "type": "object", "typeInfo": "Struct" }, @@ -9170,6 +10049,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_text::pipeline::TextLayoutInfo", "properties": { "glyphs": { "type": { @@ -9187,7 +10067,6 @@ "logical_size" ], "short_name": "TextLayoutInfo", - "title": "bevy_text::pipeline::TextLayoutInfo", "type": "object", "typeInfo": "Struct" }, @@ -9195,6 +10074,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_text::text2d::Text2dBounds", "properties": { "size": { "type": { @@ -9206,33 +10086,32 @@ "size" ], "short_name": "Text2dBounds", - "title": "bevy_text::text2d::Text2dBounds", "type": "object", "typeInfo": "Struct" }, "bevy_text::text::BreakLineOn": { "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::BreakLineOn", "oneOf": [ "WordBoundary", "AnyCharacter", "NoWrap" ], "short_name": "BreakLineOn", - "title": "bevy_text::text::BreakLineOn", "type": "string", "typeInfo": "Enum" }, "bevy_text::text::JustifyText": { "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::JustifyText", "oneOf": [ "Left", "Center", "Right" ], "short_name": "JustifyText", - "title": "bevy_text::text::JustifyText", "type": "string", "typeInfo": "Enum" }, @@ -9240,6 +10119,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_text::text::Text", "properties": { "justify": { "type": { @@ -9263,7 +10143,6 @@ "linebreak_behavior" ], "short_name": "Text", - "title": "bevy_text::text::Text", "type": "object", "typeInfo": "Struct" }, @@ -9271,6 +10150,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::TextSection", "properties": { "style": { "type": { @@ -9288,7 +10168,6 @@ "style" ], "short_name": "TextSection", - "title": "bevy_text::text::TextSection", "type": "object", "typeInfo": "Struct" }, @@ -9296,10 +10175,11 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_text::text::TextStyle", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "font": { @@ -9319,7 +10199,60 @@ "color" ], "short_name": "TextStyle", - "title": "bevy_text::text::TextStyle", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::fixed::Fixed": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::fixed::Fixed", + "properties": { + "overstep": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + }, + "timestep": { + "type": { + "$ref": "#/$defs/bevy_utils::Duration" + } + } + }, + "required": [ + "timestep", + "overstep" + ], + "short_name": "Fixed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_time::real::Real": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::real::Real", + "properties": { + "first_update": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "last_update": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, + "startup": { + "type": { + "$ref": "#/$defs/bevy_utils::Instant" + } + } + }, + "required": [ + "startup" + ], + "short_name": "Real", "type": "object", "typeInfo": "Struct" }, @@ -9327,6 +10260,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::stopwatch::Stopwatch", "properties": { "elapsed": { "type": { @@ -9344,7 +10278,6 @@ "paused" ], "short_name": "Stopwatch", - "title": "bevy_time::stopwatch::Stopwatch", "type": "object", "typeInfo": "Struct" }, @@ -9352,6 +10285,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time<()>", "properties": { "context": { "type": { @@ -9423,7 +10357,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time<()>", - "title": "bevy_time::time::Time<()>", "type": "object", "typeInfo": "Struct" }, @@ -9431,6 +10364,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time", "properties": { "context": { "type": { @@ -9502,7 +10436,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time", - "title": "bevy_time::time::Time", "type": "object", "typeInfo": "Struct" }, @@ -9510,6 +10443,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time", "properties": { "context": { "type": { @@ -9581,7 +10515,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time", - "title": "bevy_time::time::Time", "type": "object", "typeInfo": "Struct" }, @@ -9589,6 +10522,7 @@ "additionalProperties": false, "isComponent": false, "isResource": true, + "long_name": "bevy_time::time::Time", "properties": { "context": { "type": { @@ -9660,7 +10594,6 @@ "elapsed_seconds_wrapped_f64" ], "short_name": "Time", - "title": "bevy_time::time::Time", "type": "object", "typeInfo": "Struct" }, @@ -9668,6 +10601,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::timer::Timer", "properties": { "duration": { "type": { @@ -9703,14 +10637,26 @@ "times_finished_this_tick" ], "short_name": "Timer", - "title": "bevy_time::timer::Timer", "type": "object", "typeInfo": "Struct" }, + "bevy_time::timer::TimerMode": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_time::timer::TimerMode", + "oneOf": [ + "Once", + "Repeating" + ], + "short_name": "TimerMode", + "type": "string", + "typeInfo": "Enum" + }, "bevy_time::virt::Virtual": { "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_time::virt::Virtual", "properties": { "effective_speed": { "type": { @@ -9740,7 +10686,6 @@ "effective_speed" ], "short_name": "Virtual", - "title": "bevy_time::virt::Virtual", "type": "object", "typeInfo": "Struct" }, @@ -9748,6 +10693,7 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_transform::components::global_transform::GlobalTransform", "prefixItems": [ { "type": { @@ -9756,7 +10702,6 @@ } ], "short_name": "GlobalTransform", - "title": "bevy_transform::components::global_transform::GlobalTransform", "type": "array", "typeInfo": "TupleStruct" }, @@ -9764,6 +10709,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_transform::components::transform::Transform", "properties": { "rotation": { "type": { @@ -9787,7 +10733,6 @@ "scale" ], "short_name": "Transform", - "title": "bevy_transform::components::transform::Transform", "type": "object", "typeInfo": "Struct" }, @@ -9795,6 +10740,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_ui::UiScale", "prefixItems": [ { "type": { @@ -9803,32 +10749,31 @@ } ], "short_name": "UiScale", - "title": "bevy_ui::UiScale", "type": "array", "typeInfo": "TupleStruct" }, "bevy_ui::focus::FocusPolicy": { "isComponent": true, "isResource": false, + "long_name": "bevy_ui::focus::FocusPolicy", "oneOf": [ "Block", "Pass" ], "short_name": "FocusPolicy", - "title": "bevy_ui::focus::FocusPolicy", "type": "string", "typeInfo": "Enum" }, "bevy_ui::focus::Interaction": { "isComponent": true, "isResource": false, + "long_name": "bevy_ui::focus::Interaction", "oneOf": [ "Pressed", "Hovered", "None" ], "short_name": "Interaction", - "title": "bevy_ui::focus::Interaction", "type": "string", "typeInfo": "Enum" }, @@ -9836,6 +10781,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::focus::RelativeCursorPosition", "properties": { "normalized": { "type": { @@ -9844,7 +10790,7 @@ }, "normalized_visible_node_rect": { "type": { - "$ref": "#/$defs/bevy_math::Rect" + "$ref": "#/$defs/bevy_math::rects::rect::Rect" } } }, @@ -9852,7 +10798,6 @@ "normalized_visible_node_rect" ], "short_name": "RelativeCursorPosition", - "title": "bevy_ui::focus::RelativeCursorPosition", "type": "object", "typeInfo": "Struct" }, @@ -9860,6 +10805,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::geometry::UiRect", "properties": { "bottom": { "type": { @@ -9889,19 +10835,20 @@ "bottom" ], "short_name": "UiRect", - "title": "bevy_ui::geometry::UiRect", "type": "object", "typeInfo": "Struct" }, "bevy_ui::geometry::Val": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::geometry::Val", "oneOf": [ { - "title": "Auto" + "long_name": "Auto" }, { "items": false, + "long_name": "Px", "prefixItems": [ { "type": { @@ -9910,12 +10857,12 @@ } ], "short_name": "Px", - "title": "Px", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Percent", "prefixItems": [ { "type": { @@ -9924,12 +10871,12 @@ } ], "short_name": "Percent", - "title": "Percent", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Vw", "prefixItems": [ { "type": { @@ -9938,12 +10885,12 @@ } ], "short_name": "Vw", - "title": "Vw", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Vh", "prefixItems": [ { "type": { @@ -9952,12 +10899,12 @@ } ], "short_name": "Vh", - "title": "Vh", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "VMin", "prefixItems": [ { "type": { @@ -9966,12 +10913,12 @@ } ], "short_name": "VMin", - "title": "VMin", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "VMax", "prefixItems": [ { "type": { @@ -9980,13 +10927,11 @@ } ], "short_name": "VMax", - "title": "VMax", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Val", - "title": "bevy_ui::geometry::Val", "type": "object", "typeInfo": "Enum" }, @@ -9994,16 +10939,17 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::measurement::ContentSize", "properties": {}, "required": [], "short_name": "ContentSize", - "title": "bevy_ui::measurement::ContentSize", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::AlignContent": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::AlignContent", "oneOf": [ "Default", "Start", @@ -10017,13 +10963,13 @@ "SpaceAround" ], "short_name": "AlignContent", - "title": "bevy_ui::ui_node::AlignContent", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::AlignItems": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::AlignItems", "oneOf": [ "Default", "Start", @@ -10035,13 +10981,13 @@ "Stretch" ], "short_name": "AlignItems", - "title": "bevy_ui::ui_node::AlignItems", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::AlignSelf": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::AlignSelf", "oneOf": [ "Auto", "Start", @@ -10053,7 +10999,6 @@ "Stretch" ], "short_name": "AlignSelf", - "title": "bevy_ui::ui_node::AlignSelf", "type": "string", "typeInfo": "Enum" }, @@ -10061,15 +11006,15 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_ui::ui_node::BackgroundColor", "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], "short_name": "BackgroundColor", - "title": "bevy_ui::ui_node::BackgroundColor", "type": "array", "typeInfo": "TupleStruct" }, @@ -10077,26 +11022,64 @@ "isComponent": true, "isResource": false, "items": false, + "long_name": "bevy_ui::ui_node::BorderColor", "prefixItems": [ { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } } ], "short_name": "BorderColor", - "title": "bevy_ui::ui_node::BorderColor", "type": "array", "typeInfo": "TupleStruct" }, + "bevy_ui::ui_node::BorderRadius": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::BorderRadius", + "properties": { + "bottom_left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "bottom_right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top_left": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + }, + "top_right": { + "type": { + "$ref": "#/$defs/bevy_ui::geometry::Val" + } + } + }, + "required": [ + "top_left", + "top_right", + "bottom_left", + "bottom_right" + ], + "short_name": "BorderRadius", + "type": "object", + "typeInfo": "Struct" + }, "bevy_ui::ui_node::CalculatedClip": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::CalculatedClip", "properties": { "clip": { "type": { - "$ref": "#/$defs/bevy_math::Rect" + "$ref": "#/$defs/bevy_math::rects::rect::Rect" } } }, @@ -10104,39 +11087,40 @@ "clip" ], "short_name": "CalculatedClip", - "title": "bevy_ui::ui_node::CalculatedClip", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::Direction": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::Direction", "oneOf": [ "Inherit", "LeftToRight", "RightToLeft" ], "short_name": "Direction", - "title": "bevy_ui::ui_node::Direction", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::Display": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::Display", "oneOf": [ "Flex", "Grid", + "Block", "None" ], "short_name": "Display", - "title": "bevy_ui::ui_node::Display", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::FlexDirection": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::FlexDirection", "oneOf": [ "Row", "Column", @@ -10144,26 +11128,26 @@ "ColumnReverse" ], "short_name": "FlexDirection", - "title": "bevy_ui::ui_node::FlexDirection", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::FlexWrap": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::FlexWrap", "oneOf": [ "NoWrap", "Wrap", "WrapReverse" ], "short_name": "FlexWrap", - "title": "bevy_ui::ui_node::FlexWrap", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::GridAutoFlow": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridAutoFlow", "oneOf": [ "Row", "Column", @@ -10171,7 +11155,6 @@ "ColumnDense" ], "short_name": "GridAutoFlow", - "title": "bevy_ui::ui_node::GridAutoFlow", "type": "string", "typeInfo": "Enum" }, @@ -10179,6 +11162,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridPlacement", "properties": { "end": { "type": { @@ -10198,7 +11182,6 @@ }, "required": [], "short_name": "GridPlacement", - "title": "bevy_ui::ui_node::GridPlacement", "type": "object", "typeInfo": "Struct" }, @@ -10206,6 +11189,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrack", "properties": { "max_sizing_function": { "type": { @@ -10223,13 +11207,43 @@ "max_sizing_function" ], "short_name": "GridTrack", - "title": "bevy_ui::ui_node::GridTrack", "type": "object", "typeInfo": "Struct" }, + "bevy_ui::ui_node::GridTrackRepetition": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::GridTrackRepetition", + "oneOf": [ + { + "items": false, + "long_name": "Count", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/u16" + } + } + ], + "short_name": "Count", + "type": "array", + "typeInfo": "Tuple" + }, + { + "long_name": "AutoFill" + }, + { + "long_name": "AutoFit" + } + ], + "short_name": "GridTrackRepetition", + "type": "object", + "typeInfo": "Enum" + }, "bevy_ui::ui_node::JustifyContent": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::JustifyContent", "oneOf": [ "Default", "Start", @@ -10243,13 +11257,13 @@ "SpaceAround" ], "short_name": "JustifyContent", - "title": "bevy_ui::ui_node::JustifyContent", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::JustifyItems": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::JustifyItems", "oneOf": [ "Default", "Start", @@ -10259,13 +11273,13 @@ "Stretch" ], "short_name": "JustifyItems", - "title": "bevy_ui::ui_node::JustifyItems", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::JustifySelf": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::JustifySelf", "oneOf": [ "Auto", "Start", @@ -10275,14 +11289,30 @@ "Stretch" ], "short_name": "JustifySelf", - "title": "bevy_ui::ui_node::JustifySelf", "type": "string", "typeInfo": "Enum" }, + "bevy_ui::ui_node::MaxTrackSizingFunction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::MaxTrackSizingFunction", + "short_name": "MaxTrackSizingFunction", + "type": "object", + "typeInfo": "Value" + }, + "bevy_ui::ui_node::MinTrackSizingFunction": { + "isComponent": false, + "isResource": false, + "long_name": "bevy_ui::ui_node::MinTrackSizingFunction", + "short_name": "MinTrackSizingFunction", + "type": "object", + "typeInfo": "Value" + }, "bevy_ui::ui_node::Node": { "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::Node", "properties": { "calculated_size": { "type": { @@ -10318,7 +11348,6 @@ "unrounded_size" ], "short_name": "Node", - "title": "bevy_ui::ui_node::Node", "type": "object", "typeInfo": "Struct" }, @@ -10326,10 +11355,11 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::Outline", "properties": { "color": { "type": { - "$ref": "#/$defs/bevy_render::color::Color" + "$ref": "#/$defs/bevy_color::color::Color" } }, "offset": { @@ -10349,7 +11379,6 @@ "color" ], "short_name": "Outline", - "title": "bevy_ui::ui_node::Outline", "type": "object", "typeInfo": "Struct" }, @@ -10357,6 +11386,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::Overflow", "properties": { "x": { "type": { @@ -10374,31 +11404,31 @@ "y" ], "short_name": "Overflow", - "title": "bevy_ui::ui_node::Overflow", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::OverflowAxis": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::OverflowAxis", "oneOf": [ "Visible", - "Clip" + "Clip", + "Hidden" ], "short_name": "OverflowAxis", - "title": "bevy_ui::ui_node::OverflowAxis", "type": "string", "typeInfo": "Enum" }, "bevy_ui::ui_node::PositionType": { "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::PositionType", "oneOf": [ "Relative", "Absolute" ], "short_name": "PositionType", - "title": "bevy_ui::ui_node::PositionType", "type": "string", "typeInfo": "Enum" }, @@ -10406,6 +11436,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_ui::ui_node::RepeatedGridTrack", "properties": { "repetition": { "type": { @@ -10414,7 +11445,7 @@ }, "tracks": { "type": { - "$ref": "#/$defs/bevy_utils::smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" + "$ref": "#/$defs/smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>" } } }, @@ -10423,7 +11454,6 @@ "tracks" ], "short_name": "RepeatedGridTrack", - "title": "bevy_ui::ui_node::RepeatedGridTrack", "type": "object", "typeInfo": "Struct" }, @@ -10431,6 +11461,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::Style", "properties": { "align_content": { "type": { @@ -10663,7 +11694,6 @@ "grid_column" ], "short_name": "Style", - "title": "bevy_ui::ui_node::Style", "type": "object", "typeInfo": "Struct" }, @@ -10671,6 +11701,7 @@ "isComponent": false, "isResource": false, "items": false, + "long_name": "bevy_ui::ui_node::TargetCamera", "prefixItems": [ { "type": { @@ -10679,7 +11710,6 @@ } ], "short_name": "TargetCamera", - "title": "bevy_ui::ui_node::TargetCamera", "type": "array", "typeInfo": "TupleStruct" }, @@ -10687,7 +11717,13 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::UiImage", "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, "flip_x": { "type": { "$ref": "#/$defs/bool" @@ -10705,21 +11741,23 @@ } }, "required": [ + "color", "texture", "flip_x", "flip_y" ], "short_name": "UiImage", - "title": "bevy_ui::ui_node::UiImage", "type": "object", "typeInfo": "Struct" }, "bevy_ui::ui_node::ZIndex": { "isComponent": true, "isResource": false, + "long_name": "bevy_ui::ui_node::ZIndex", "oneOf": [ { "items": false, + "long_name": "Local", "prefixItems": [ { "type": { @@ -10728,12 +11766,12 @@ } ], "short_name": "Local", - "title": "Local", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "Global", "prefixItems": [ { "type": { @@ -10742,13 +11780,11 @@ } ], "short_name": "Global", - "title": "Global", "type": "array", "typeInfo": "Tuple" } ], "short_name": "ZIndex", - "title": "bevy_ui::ui_node::ZIndex", "type": "object", "typeInfo": "Enum" }, @@ -10756,10 +11792,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::button::Button", "properties": {}, "required": [], "short_name": "Button", - "title": "bevy_ui::widget::button::Button", "type": "object", "typeInfo": "Struct" }, @@ -10767,10 +11803,11 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::image::UiImageSize", "properties": { "size": { "type": { - "$ref": "#/$defs/glam::Vec2" + "$ref": "#/$defs/glam::UVec2" } } }, @@ -10778,7 +11815,6 @@ "size" ], "short_name": "UiImageSize", - "title": "bevy_ui::widget::image::UiImageSize", "type": "object", "typeInfo": "Struct" }, @@ -10786,10 +11822,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::label::Label", "properties": {}, "required": [], "short_name": "Label", - "title": "bevy_ui::widget::label::Label", "type": "object", "typeInfo": "Struct" }, @@ -10797,6 +11833,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_ui::widget::text::TextFlags", "properties": { "needs_new_measure_func": { "type": { @@ -10814,71 +11851,371 @@ "needs_recompute" ], "short_name": "TextFlags", - "title": "bevy_ui::widget::text::TextFlags", "type": "object", "typeInfo": "Struct" }, "bevy_utils::Duration": { "isComponent": false, "isResource": false, + "long_name": "bevy_utils::Duration", "short_name": "Duration", - "title": "bevy_utils::Duration", - "type": "object", - "typeInfo": "Value" - }, - "bevy_utils::HashSet": { - "isComponent": false, - "isResource": false, - "short_name": "HashSet", - "title": "bevy_utils::HashSet", "type": "object", "typeInfo": "Value" }, "bevy_utils::Instant": { "isComponent": false, "isResource": false, + "long_name": "bevy_utils::Instant", "short_name": "Instant", - "title": "bevy_utils::Instant", "type": "object", "typeInfo": "Value" }, - "bevy_utils::Uuid": { + "bevy_utils::hashbrown::HashMap": { "isComponent": false, "isResource": false, - "short_name": "Uuid", - "title": "bevy_utils::Uuid", + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", "type": "object", - "typeInfo": "Value" + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } }, "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { - "additionalProperties": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { "type": { "$ref": "#/$defs/alloc::vec::Vec" } - }, - "isComponent": false, - "isResource": false, - "short_name": "HashMap, DefaultHashBuilder>", - "title": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", - "type": "object", - "typeInfo": "Map" + } }, - "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { "isComponent": false, "isResource": false, - "items": { + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_example::test_components::BasicTest" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_example::test_components::EnumComplex" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_animation::AnimationTargetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::NoOpHash>", + "short_name": "HashMap, NoOpHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_asset::id::AssetId" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, usize, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>": { + "isComponent": false, + "isResource": false, + "keyType": { "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } }, - "short_name": "SmallVec<[Entity; 8]>", - "title": "bevy_utils::smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", - "type": "array", - "typeInfo": "List" + "long_name": "bevy_utils::hashbrown::HashMap, bevy_ecs::entity::hash::EntityHash>", + "short_name": "HashMap, EntityHash>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadAxis" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::AxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonAxisSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::GamepadButton" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_input::gamepad::ButtonSettings" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>", + "short_name": "HashMap, DefaultHashBuilder>", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "bevy_utils::hashbrown::HashMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/u32" + } + }, + "long_name": "bevy_utils::hashbrown::HashMap", + "short_name": "HashMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } }, "bevy_window::cursor::CursorIcon": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::cursor::CursorIcon", "oneOf": [ "Default", "ContextMenu", @@ -10916,20 +12253,21 @@ "ZoomOut" ], "short_name": "CursorIcon", - "title": "bevy_window::cursor::CursorIcon", "type": "string", "typeInfo": "Enum" }, - "bevy_window::event::ApplicationLifetime": { + "bevy_window::event::AppLifecycle": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::AppLifecycle", "oneOf": [ - "Started", + "Idle", + "Running", + "WillSuspend", "Suspended", - "Resumed" + "WillResume" ], - "short_name": "ApplicationLifetime", - "title": "bevy_window::event::ApplicationLifetime", + "short_name": "AppLifecycle", "type": "string", "typeInfo": "Enum" }, @@ -10937,6 +12275,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::CursorEntered", "properties": { "window": { "type": { @@ -10948,7 +12287,6 @@ "window" ], "short_name": "CursorEntered", - "title": "bevy_window::event::CursorEntered", "type": "object", "typeInfo": "Struct" }, @@ -10956,6 +12294,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::CursorLeft", "properties": { "window": { "type": { @@ -10967,7 +12306,6 @@ "window" ], "short_name": "CursorLeft", - "title": "bevy_window::event::CursorLeft", "type": "object", "typeInfo": "Struct" }, @@ -10975,6 +12313,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::CursorMoved", "properties": { "delta": { "type": { @@ -10997,25 +12336,26 @@ "position" ], "short_name": "CursorMoved", - "title": "bevy_window::event::CursorMoved", "type": "object", "typeInfo": "Struct" }, "bevy_window::event::FileDragAndDrop": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::FileDragAndDrop", "oneOf": [ { "additionalProperties": false, + "long_name": "DroppedFile", "properties": { "path_buf": { - "title": "path_buf", + "long_name": "path_buf", "type": { "$ref": "#/$defs/std::path::PathBuf" } }, "window": { - "title": "window", + "long_name": "window", "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } @@ -11026,21 +12366,21 @@ "path_buf" ], "short_name": "DroppedFile", - "title": "DroppedFile", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "HoveredFile", "properties": { "path_buf": { - "title": "path_buf", + "long_name": "path_buf", "type": { "$ref": "#/$defs/std::path::PathBuf" } }, "window": { - "title": "window", + "long_name": "window", "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } @@ -11051,15 +12391,15 @@ "path_buf" ], "short_name": "HoveredFile", - "title": "HoveredFile", "type": "object", "typeInfo": "Struct" }, { "additionalProperties": false, + "long_name": "HoveredFileCanceled", "properties": { "window": { - "title": "window", + "long_name": "window", "type": { "$ref": "#/$defs/bevy_ecs::entity::Entity" } @@ -11069,13 +12409,11 @@ "window" ], "short_name": "HoveredFileCanceled", - "title": "HoveredFileCanceled", "type": "object", "typeInfo": "Struct" } ], "short_name": "FileDragAndDrop", - "title": "bevy_window::event::FileDragAndDrop", "type": "object", "typeInfo": "Enum" }, @@ -11083,6 +12421,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::ReceivedCharacter", "properties": { "char": { "type": { @@ -11100,7 +12439,6 @@ "char" ], "short_name": "ReceivedCharacter", - "title": "bevy_window::event::ReceivedCharacter", "type": "object", "typeInfo": "Struct" }, @@ -11108,10 +12446,10 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::RequestRedraw", "properties": {}, "required": [], "short_name": "RequestRedraw", - "title": "bevy_window::event::RequestRedraw", "type": "object", "typeInfo": "Struct" }, @@ -11119,6 +12457,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowBackendScaleFactorChanged", "properties": { "scale_factor": { "type": { @@ -11136,7 +12475,6 @@ "scale_factor" ], "short_name": "WindowBackendScaleFactorChanged", - "title": "bevy_window::event::WindowBackendScaleFactorChanged", "type": "object", "typeInfo": "Struct" }, @@ -11144,6 +12482,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowCloseRequested", "properties": { "window": { "type": { @@ -11155,7 +12494,6 @@ "window" ], "short_name": "WindowCloseRequested", - "title": "bevy_window::event::WindowCloseRequested", "type": "object", "typeInfo": "Struct" }, @@ -11163,6 +12501,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowClosed", "properties": { "window": { "type": { @@ -11174,7 +12513,25 @@ "window" ], "short_name": "WindowClosed", - "title": "bevy_window::event::WindowClosed", + "type": "object", + "typeInfo": "Struct" + }, + "bevy_window::event::WindowClosing": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "bevy_window::event::WindowClosing", + "properties": { + "window": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + } + }, + "required": [ + "window" + ], + "short_name": "WindowClosing", "type": "object", "typeInfo": "Struct" }, @@ -11182,6 +12539,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowCreated", "properties": { "window": { "type": { @@ -11193,7 +12551,6 @@ "window" ], "short_name": "WindowCreated", - "title": "bevy_window::event::WindowCreated", "type": "object", "typeInfo": "Struct" }, @@ -11201,6 +12558,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowFocused", "properties": { "focused": { "type": { @@ -11218,7 +12576,6 @@ "focused" ], "short_name": "WindowFocused", - "title": "bevy_window::event::WindowFocused", "type": "object", "typeInfo": "Struct" }, @@ -11226,6 +12583,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowMoved", "properties": { "position": { "type": { @@ -11243,7 +12601,6 @@ "position" ], "short_name": "WindowMoved", - "title": "bevy_window::event::WindowMoved", "type": "object", "typeInfo": "Struct" }, @@ -11251,6 +12608,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowOccluded", "properties": { "occluded": { "type": { @@ -11268,7 +12626,6 @@ "occluded" ], "short_name": "WindowOccluded", - "title": "bevy_window::event::WindowOccluded", "type": "object", "typeInfo": "Struct" }, @@ -11276,6 +12633,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowResized", "properties": { "height": { "type": { @@ -11299,7 +12657,6 @@ "height" ], "short_name": "WindowResized", - "title": "bevy_window::event::WindowResized", "type": "object", "typeInfo": "Struct" }, @@ -11307,6 +12664,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowScaleFactorChanged", "properties": { "scale_factor": { "type": { @@ -11324,7 +12682,6 @@ "scale_factor" ], "short_name": "WindowScaleFactorChanged", - "title": "bevy_window::event::WindowScaleFactorChanged", "type": "object", "typeInfo": "Struct" }, @@ -11332,6 +12689,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::event::WindowThemeChanged", "properties": { "theme": { "type": { @@ -11349,13 +12707,13 @@ "theme" ], "short_name": "WindowThemeChanged", - "title": "bevy_window::event::WindowThemeChanged", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::CompositeAlphaMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::CompositeAlphaMode", "oneOf": [ "Auto", "Opaque", @@ -11364,7 +12722,6 @@ "Inherit" ], "short_name": "CompositeAlphaMode", - "title": "bevy_window::window::CompositeAlphaMode", "type": "string", "typeInfo": "Enum" }, @@ -11372,6 +12729,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::Cursor", "properties": { "grab_mode": { "type": { @@ -11401,20 +12759,19 @@ "hit_test" ], "short_name": "Cursor", - "title": "bevy_window::window::Cursor", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::CursorGrabMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::CursorGrabMode", "oneOf": [ "None", "Confined", "Locked" ], "short_name": "CursorGrabMode", - "title": "bevy_window::window::CursorGrabMode", "type": "string", "typeInfo": "Enum" }, @@ -11422,6 +12779,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::EnabledButtons", "properties": { "close": { "type": { @@ -11445,7 +12803,6 @@ "close" ], "short_name": "EnabledButtons", - "title": "bevy_window::window::EnabledButtons", "type": "object", "typeInfo": "Struct" }, @@ -11453,6 +12810,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::InternalWindowState", "properties": { "maximize_request": { "type": { @@ -11472,22 +12830,23 @@ }, "required": [], "short_name": "InternalWindowState", - "title": "bevy_window::window::InternalWindowState", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::MonitorSelection": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::MonitorSelection", "oneOf": [ { - "title": "Current" + "long_name": "Current" }, { - "title": "Primary" + "long_name": "Primary" }, { "items": false, + "long_name": "Index", "prefixItems": [ { "type": { @@ -11496,19 +12855,18 @@ } ], "short_name": "Index", - "title": "Index", "type": "array", "typeInfo": "Tuple" } ], "short_name": "MonitorSelection", - "title": "bevy_window::window::MonitorSelection", "type": "object", "typeInfo": "Enum" }, "bevy_window::window::PresentMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::PresentMode", "oneOf": [ "AutoVsync", "AutoNoVsync", @@ -11518,7 +12876,6 @@ "Mailbox" ], "short_name": "PresentMode", - "title": "bevy_window::window::PresentMode", "type": "string", "typeInfo": "Enum" }, @@ -11526,10 +12883,10 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_window::window::PrimaryWindow", "properties": {}, "required": [], "short_name": "PrimaryWindow", - "title": "bevy_window::window::PrimaryWindow", "type": "object", "typeInfo": "Struct" }, @@ -11537,6 +12894,7 @@ "additionalProperties": false, "isComponent": true, "isResource": false, + "long_name": "bevy_window::window::Window", "properties": { "canvas": { "type": { @@ -11558,11 +12916,21 @@ "$ref": "#/$defs/bool" } }, + "desired_maximum_frame_latency": { + "type": { + "$ref": "#/$defs/core::option::Option" + } + }, "enabled_buttons": { "type": { "$ref": "#/$defs/bevy_window::window::EnabledButtons" } }, + "fit_canvas_to_parent": { + "type": { + "$ref": "#/$defs/bool" + } + }, "focused": { "type": { "$ref": "#/$defs/bool" @@ -11608,6 +12976,26 @@ "$ref": "#/$defs/bool" } }, + "recognize_doubletap_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_pan_gesture": { + "type": { + "$ref": "#/$defs/core::option::Option<(u8, u8)>" + } + }, + "recognize_pinch_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "recognize_rotation_gesture": { + "type": { + "$ref": "#/$defs/bool" + } + }, "resizable": { "type": { "$ref": "#/$defs/bool" @@ -11623,6 +13011,11 @@ "$ref": "#/$defs/bevy_window::window::WindowResolution" } }, + "skip_taskbar": { + "type": { + "$ref": "#/$defs/bool" + } + }, "title": { "type": { "$ref": "#/$defs/alloc::string::String" @@ -11664,33 +13057,38 @@ "transparent", "focused", "window_level", + "fit_canvas_to_parent", "prevent_default_event_handling", "internal", "ime_enabled", "ime_position", - "visible" + "visible", + "skip_taskbar", + "recognize_pinch_gesture", + "recognize_rotation_gesture", + "recognize_doubletap_gesture" ], "short_name": "Window", - "title": "bevy_window::window::Window", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::WindowLevel": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowLevel", "oneOf": [ "AlwaysOnBottom", "Normal", "AlwaysOnTop" ], "short_name": "WindowLevel", - "title": "bevy_window::window::WindowLevel", "type": "string", "typeInfo": "Enum" }, "bevy_window::window::WindowMode": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowMode", "oneOf": [ "Windowed", "BorderlessFullscreen", @@ -11698,19 +13096,20 @@ "Fullscreen" ], "short_name": "WindowMode", - "title": "bevy_window::window::WindowMode", "type": "string", "typeInfo": "Enum" }, "bevy_window::window::WindowPosition": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowPosition", "oneOf": [ { - "title": "Automatic" + "long_name": "Automatic" }, { "items": false, + "long_name": "Centered", "prefixItems": [ { "type": { @@ -11719,12 +13118,12 @@ } ], "short_name": "Centered", - "title": "Centered", "type": "array", "typeInfo": "Tuple" }, { "items": false, + "long_name": "At", "prefixItems": [ { "type": { @@ -11733,13 +13132,11 @@ } ], "short_name": "At", - "title": "At", "type": "array", "typeInfo": "Tuple" } ], "short_name": "WindowPosition", - "title": "bevy_window::window::WindowPosition", "type": "object", "typeInfo": "Enum" }, @@ -11747,6 +13144,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowResizeConstraints", "properties": { "max_height": { "type": { @@ -11776,7 +13174,6 @@ "max_height" ], "short_name": "WindowResizeConstraints", - "title": "bevy_window::window::WindowResizeConstraints", "type": "object", "typeInfo": "Struct" }, @@ -11784,6 +13181,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowResolution", "properties": { "physical_height": { "type": { @@ -11812,63 +13210,499 @@ "scale_factor" ], "short_name": "WindowResolution", - "title": "bevy_window::window::WindowResolution", "type": "object", "typeInfo": "Struct" }, "bevy_window::window::WindowTheme": { "isComponent": false, "isResource": false, + "long_name": "bevy_window::window::WindowTheme", "oneOf": [ "Light", "Dark" ], "short_name": "WindowTheme", - "title": "bevy_window::window::WindowTheme", + "type": "string", + "typeInfo": "Enum" + }, + "blenvy::blueprints::animation::AnimationInfo": { + "additionalProperties": false, + "isComponent": false, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfo", + "properties": { + "frame_end": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_end_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frame_start_override": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "frames_length": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "frame_start", + "frame_end", + "frames_length", + "frame_start_override", + "frame_end_override" + ], + "short_name": "AnimationInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationInfos": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::AnimationInfos", + "properties": { + "animations": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + } + }, + "required": [ + "animations" + ], + "short_name": "AnimationInfos", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::AnimationMarkers": { + "isComponent": true, + "isResource": false, + "items": false, + "long_name": "blenvy::blueprints::animation::AnimationMarkers", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "AnimationMarkers", + "type": "array", + "typeInfo": "TupleStruct" + }, + "blenvy::blueprints::animation::BlueprintAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::BlueprintAnimations", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + }, + "named_indices": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations", + "named_indices", + "graph" + ], + "short_name": "BlueprintAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::animation::SceneAnimations": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::animation::SceneAnimations", + "properties": { + "graph": { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + }, + "named_animations": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + }, + "named_indices": { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap" + } + } + }, + "required": [ + "named_animations", + "named_indices", + "graph" + ], + "short_name": "SceneAnimations", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::BlueprintAsset": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::BlueprintAsset", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "BlueprintAsset", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::assets::BlueprintAssets": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::assets::BlueprintAssets", + "properties": { + "assets": { + "type": { + "$ref": "#/$defs/alloc::vec::Vec" + } + }, + "loaded": { + "type": { + "$ref": "#/$defs/bool" + } + }, + "progress": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "assets", + "loaded", + "progress" + ], + "short_name": "BlueprintAssets", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::materials::MaterialInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::materials::MaterialInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "MaterialInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::BlueprintInfo": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::BlueprintInfo", + "properties": { + "name": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + }, + "path": { + "type": { + "$ref": "#/$defs/alloc::string::String" + } + } + }, + "required": [ + "name", + "path" + ], + "short_name": "BlueprintInfo", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::HideUntilReady": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::HideUntilReady", + "properties": {}, + "required": [], + "short_name": "HideUntilReady", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::blueprints::spawn_from_blueprints::SpawnBlueprint": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::blueprints::spawn_from_blueprints::SpawnBlueprint", + "properties": {}, + "required": [], + "short_name": "SpawnBlueprint", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::GltfProcessed": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::GltfProcessed", + "properties": {}, + "required": [], + "short_name": "GltfProcessed", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderBackgroundShader": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderBackgroundShader", + "properties": { + "color": { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + }, + "strength": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "color", + "strength" + ], + "short_name": "BlenderBackgroundShader", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderColorGrading": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderColorGrading", + "properties": { + "exposure": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "gamma": { + "type": { + "$ref": "#/$defs/f32" + } + } + }, + "required": [ + "exposure", + "gamma" + ], + "short_name": "BlenderColorGrading", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderLightShadows": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderLightShadows", + "properties": { + "buffer_bias": { + "type": { + "$ref": "#/$defs/f32" + } + }, + "enabled": { + "type": { + "$ref": "#/$defs/bool" + } + } + }, + "required": [ + "enabled", + "buffer_bias" + ], + "short_name": "BlenderLightShadows", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderShadowSettings": { + "additionalProperties": false, + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderShadowSettings", + "properties": { + "cascade_size": { + "type": { + "$ref": "#/$defs/usize" + } + } + }, + "required": [ + "cascade_size" + ], + "short_name": "BlenderShadowSettings", + "type": "object", + "typeInfo": "Struct" + }, + "blenvy::components::blender_settings::lighting::BlenderToneMapping": { + "isComponent": true, + "isResource": false, + "long_name": "blenvy::components::blender_settings::lighting::BlenderToneMapping", + "oneOf": [ + "None", + "AgX", + "Filmic" + ], + "short_name": "BlenderToneMapping", "type": "string", "typeInfo": "Enum" }, "bool": { "isComponent": false, "isResource": false, + "long_name": "bool", "short_name": "bool", - "title": "bool", "type": "boolean", "typeInfo": "Value" }, "char": { "isComponent": false, "isResource": false, + "long_name": "char", "short_name": "char", - "title": "char", "type": "string", "typeInfo": "Value" }, + "core::num::NonZeroI16": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroI16", + "short_name": "NonZeroI16", + "type": "object", + "typeInfo": "Value" + }, + "core::num::NonZeroU16": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroU16", + "short_name": "NonZeroU16", + "type": "object", + "typeInfo": "Value" + }, + "core::num::NonZeroU32": { + "isComponent": false, + "isResource": false, + "long_name": "core::num::NonZeroU32", + "short_name": "NonZeroU32", + "type": "object", + "typeInfo": "Value" + }, "core::ops::Range": { "isComponent": false, "isResource": false, + "long_name": "core::ops::Range", "short_name": "Range", - "title": "core::ops::Range", "type": "object", "typeInfo": "Value" }, - "core::ops::Range": { + "core::option::Option<(u8, u8)>": { "isComponent": false, "isResource": false, - "short_name": "Range", - "title": "core::ops::Range", + "long_name": "core::option::Option<(u8, u8)>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/(u8, u8)" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option<(u8, u8)>", "type": "object", - "typeInfo": "Value" + "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -11877,25 +13711,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -11904,25 +13738,52 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option>", - "title": "core::option::Option>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_asset::handle::Handle" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option>", "type": "object", "typeInfo": "Enum" }, "core::option::Option>": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option>", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -11931,25 +13792,133 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option>", - "title": "core::option::Option>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_audio::audio::SpatialScale" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_color::color::Color" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_input::touch::ForceTouch" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_math::rects::rect::Rect" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -11958,25 +13927,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -11985,25 +13954,106 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::Instant" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>>", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_utils::hashbrown::HashMap, usize, bevy_utils::hashbrown::hash_map::DefaultHashBuilder>" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option, usize, DefaultHashBuilder>>", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/bevy_window::window::WindowTheme" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -12012,25 +14062,133 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/char" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroI16" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroU16" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/core::num::NonZeroU32" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -12039,25 +14197,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -12066,25 +14224,25 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", "type": "object", "typeInfo": "Enum" }, "core::option::Option": { "isComponent": false, "isResource": false, + "long_name": "core::option::Option", "oneOf": [ { - "title": "None" + "long_name": "None" }, { "items": false, + "long_name": "Some", "prefixItems": [ { "type": { @@ -12093,29 +14251,81 @@ } ], "short_name": "Some", - "title": "Some", "type": "array", "typeInfo": "Tuple" } ], "short_name": "Option", - "title": "core::option::Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/glam::Vec2" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", + "type": "object", + "typeInfo": "Enum" + }, + "core::option::Option": { + "isComponent": false, + "isResource": false, + "long_name": "core::option::Option", + "oneOf": [ + { + "long_name": "None" + }, + { + "items": false, + "long_name": "Some", + "prefixItems": [ + { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + } + ], + "short_name": "Some", + "type": "array", + "typeInfo": "Tuple" + } + ], + "short_name": "Option", "type": "object", "typeInfo": "Enum" }, "f32": { "isComponent": false, "isResource": false, + "long_name": "f32", "short_name": "f32", - "title": "f32", "type": "float", "typeInfo": "Value" }, "f64": { "isComponent": false, "isResource": false, + "long_name": "f64", "short_name": "f64", - "title": "f64", "type": "float", "typeInfo": "Value" }, @@ -12123,6 +14333,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Affine2", "properties": { "matrix2": { "type": { @@ -12140,7 +14351,6 @@ "translation" ], "short_name": "Affine2", - "title": "glam::Affine2", "type": "object", "typeInfo": "Struct" }, @@ -12148,6 +14358,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Affine3A", "properties": { "matrix3": { "type": { @@ -12165,296 +14376,6 @@ "translation" ], "short_name": "Affine3A", - "title": "glam::Affine3A", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec2": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "y": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "x", - "y" - ], - "short_name": "BVec2", - "title": "glam::BVec2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "z": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "x", - "y", - "z" - ], - "short_name": "BVec3", - "title": "glam::BVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec3A": { - "isComponent": false, - "isResource": false, - "short_name": "BVec3A", - "title": "glam::BVec3A", - "type": "object", - "typeInfo": "Value" - }, - "glam::BVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "w": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "x": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "y": { - "type": { - "$ref": "#/$defs/bool" - } - }, - "z": { - "type": { - "$ref": "#/$defs/bool" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "BVec4", - "title": "glam::BVec4", - "type": "object", - "typeInfo": "Struct" - }, - "glam::BVec4A": { - "isComponent": false, - "isResource": false, - "short_name": "BVec4A", - "title": "glam::BVec4A", - "type": "object", - "typeInfo": "Value" - }, - "glam::DAffine2": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "matrix2": { - "type": { - "$ref": "#/$defs/glam::DMat2" - } - }, - "translation": { - "type": { - "$ref": "#/$defs/glam::DVec2" - } - } - }, - "required": [ - "matrix2", - "translation" - ], - "short_name": "DAffine2", - "title": "glam::DAffine2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DAffine3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "matrix3": { - "type": { - "$ref": "#/$defs/glam::DMat3" - } - }, - "translation": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - } - }, - "required": [ - "matrix3", - "translation" - ], - "short_name": "DAffine3", - "title": "glam::DAffine3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DMat2": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x_axis": { - "type": { - "$ref": "#/$defs/glam::DVec2" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::DVec2" - } - } - }, - "required": [ - "x_axis", - "y_axis" - ], - "short_name": "DMat2", - "title": "glam::DMat2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DMat3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x_axis": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - }, - "z_axis": { - "type": { - "$ref": "#/$defs/glam::DVec3" - } - } - }, - "required": [ - "x_axis", - "y_axis", - "z_axis" - ], - "short_name": "DMat3", - "title": "glam::DMat3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DMat4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "w_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - }, - "x_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - }, - "z_axis": { - "type": { - "$ref": "#/$defs/glam::DVec4" - } - } - }, - "required": [ - "x_axis", - "y_axis", - "z_axis", - "w_axis" - ], - "short_name": "DMat4", - "title": "glam::DMat4", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DQuat": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "w": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "x": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "z": { - "type": { - "$ref": "#/$defs/f64" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "DQuat", - "title": "glam::DQuat", "type": "object", "typeInfo": "Struct" }, @@ -12462,6 +14383,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::DVec2", "properties": { "x": { "type": { @@ -12479,75 +14401,6 @@ "y" ], "short_name": "DVec2", - "title": "glam::DVec2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DVec3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "z": { - "type": { - "$ref": "#/$defs/f64" - } - } - }, - "required": [ - "x", - "y", - "z" - ], - "short_name": "DVec3", - "title": "glam::DVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::DVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "w": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "x": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "y": { - "type": { - "$ref": "#/$defs/f64" - } - }, - "z": { - "type": { - "$ref": "#/$defs/f64" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "DVec4", - "title": "glam::DVec4", "type": "object", "typeInfo": "Struct" }, @@ -12555,6 +14408,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::IVec2", "properties": { "x": { "type": { @@ -12572,75 +14426,6 @@ "y" ], "short_name": "IVec2", - "title": "glam::IVec2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::IVec3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "z": { - "type": { - "$ref": "#/$defs/i32" - } - } - }, - "required": [ - "x", - "y", - "z" - ], - "short_name": "IVec3", - "title": "glam::IVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::IVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "w": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "x": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/i32" - } - }, - "z": { - "type": { - "$ref": "#/$defs/i32" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "IVec4", - "title": "glam::IVec4", "type": "object", "typeInfo": "Struct" }, @@ -12648,6 +14433,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Mat2", "properties": { "x_axis": { "type": { @@ -12665,38 +14451,6 @@ "y_axis" ], "short_name": "Mat2", - "title": "glam::Mat2", - "type": "object", - "typeInfo": "Struct" - }, - "glam::Mat3": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "x_axis": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "y_axis": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - }, - "z_axis": { - "type": { - "$ref": "#/$defs/glam::Vec3" - } - } - }, - "required": [ - "x_axis", - "y_axis", - "z_axis" - ], - "short_name": "Mat3", - "title": "glam::Mat3", "type": "object", "typeInfo": "Struct" }, @@ -12704,6 +14458,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Mat3A", "properties": { "x_axis": { "type": { @@ -12727,7 +14482,6 @@ "z_axis" ], "short_name": "Mat3A", - "title": "glam::Mat3A", "type": "object", "typeInfo": "Struct" }, @@ -12735,6 +14489,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Mat4", "properties": { "w_axis": { "type": { @@ -12764,7 +14519,6 @@ "w_axis" ], "short_name": "Mat4", - "title": "glam::Mat4", "type": "object", "typeInfo": "Struct" }, @@ -12772,6 +14526,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Quat", "properties": { "w": { "type": { @@ -12801,7 +14556,6 @@ "w" ], "short_name": "Quat", - "title": "glam::Quat", "type": "object", "typeInfo": "Struct" }, @@ -12809,6 +14563,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::UVec2", "properties": { "x": { "type": { @@ -12826,7 +14581,6 @@ "y" ], "short_name": "UVec2", - "title": "glam::UVec2", "type": "object", "typeInfo": "Struct" }, @@ -12834,6 +14588,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::UVec3", "properties": { "x": { "type": { @@ -12857,44 +14612,6 @@ "z" ], "short_name": "UVec3", - "title": "glam::UVec3", - "type": "object", - "typeInfo": "Struct" - }, - "glam::UVec4": { - "additionalProperties": false, - "isComponent": false, - "isResource": false, - "properties": { - "w": { - "type": { - "$ref": "#/$defs/u32" - } - }, - "x": { - "type": { - "$ref": "#/$defs/u32" - } - }, - "y": { - "type": { - "$ref": "#/$defs/u32" - } - }, - "z": { - "type": { - "$ref": "#/$defs/u32" - } - } - }, - "required": [ - "x", - "y", - "z", - "w" - ], - "short_name": "UVec4", - "title": "glam::UVec4", "type": "object", "typeInfo": "Struct" }, @@ -12902,6 +14619,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec2", "properties": { "x": { "type": { @@ -12919,7 +14637,6 @@ "y" ], "short_name": "Vec2", - "title": "glam::Vec2", "type": "object", "typeInfo": "Struct" }, @@ -12927,6 +14644,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec3", "properties": { "x": { "type": { @@ -12950,7 +14668,6 @@ "z" ], "short_name": "Vec3", - "title": "glam::Vec3", "type": "object", "typeInfo": "Struct" }, @@ -12958,6 +14675,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec3A", "properties": { "x": { "type": { @@ -12981,7 +14699,6 @@ "z" ], "short_name": "Vec3A", - "title": "glam::Vec3A", "type": "object", "typeInfo": "Struct" }, @@ -12989,6 +14706,7 @@ "additionalProperties": false, "isComponent": false, "isResource": false, + "long_name": "glam::Vec4", "properties": { "w": { "type": { @@ -13018,123 +14736,211 @@ "w" ], "short_name": "Vec4", - "title": "glam::Vec4", "type": "object", "typeInfo": "Struct" }, "i128": { "isComponent": false, "isResource": false, + "long_name": "i128", "short_name": "i128", - "title": "i128", "type": "int", "typeInfo": "Value" }, "i16": { "isComponent": false, "isResource": false, + "long_name": "i16", "short_name": "i16", - "title": "i16", "type": "int", "typeInfo": "Value" }, "i32": { "isComponent": false, "isResource": false, + "long_name": "i32", "short_name": "i32", - "title": "i32", "type": "int", "typeInfo": "Value" }, "i64": { "isComponent": false, "isResource": false, + "long_name": "i64", "short_name": "i64", - "title": "i64", "type": "int", "typeInfo": "Value" }, "i8": { "isComponent": false, "isResource": false, + "long_name": "i8", "short_name": "i8", - "title": "i8", "type": "int", "typeInfo": "Value" }, "isize": { "isComponent": false, "isResource": false, + "long_name": "isize", "short_name": "isize", - "title": "isize", "type": "int", "typeInfo": "Value" }, - "std::ffi::OsString": { + "petgraph::graph::DiGraph": { "isComponent": false, "isResource": false, - "short_name": "OsString", - "title": "std::ffi::OsString", + "long_name": "petgraph::graph::DiGraph", + "short_name": "DiGraph", "type": "object", "typeInfo": "Value" }, + "petgraph::graph::NodeIndex": { + "isComponent": false, + "isResource": false, + "long_name": "petgraph::graph::NodeIndex", + "short_name": "NodeIndex", + "type": "object", + "typeInfo": "Value" + }, + "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ecs::entity::Entity" + } + }, + "long_name": "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>", + "short_name": "SmallVec<[Entity; 8]>", + "type": "array", + "typeInfo": "List" + }, + "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/bevy_ui::ui_node::GridTrack" + } + }, + "long_name": "smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>", + "short_name": "SmallVec<[GridTrack; 1]>", + "type": "array", + "typeInfo": "List" + }, + "smallvec::SmallVec<[u64; 1]>": { + "isComponent": false, + "isResource": false, + "items": { + "type": { + "$ref": "#/$defs/u64" + } + }, + "long_name": "smallvec::SmallVec<[u64; 1]>", + "short_name": "SmallVec<[u64; 1]>", + "type": "array", + "typeInfo": "List" + }, + "smol_str::SmolStr": { + "isComponent": false, + "isResource": false, + "long_name": "smol_str::SmolStr", + "short_name": "SmolStr", + "type": "object", + "typeInfo": "Value" + }, + "std::collections::BTreeMap": { + "isComponent": false, + "isResource": false, + "keyType": { + "type": { + "$ref": "#/$defs/petgraph::graph::NodeIndex" + } + }, + "long_name": "std::collections::BTreeMap", + "short_name": "BTreeMap", + "type": "object", + "typeInfo": "Map", + "valueType": { + "type": { + "$ref": "#/$defs/bevy_animation::ActiveAnimation" + } + } + }, "std::path::PathBuf": { "isComponent": false, "isResource": false, + "long_name": "std::path::PathBuf", "short_name": "PathBuf", - "title": "std::path::PathBuf", + "type": "object", + "typeInfo": "Value" + }, + "std::sync::Arc": { + "isComponent": false, + "isResource": false, + "long_name": "std::sync::Arc", + "short_name": "Arc", "type": "object", "typeInfo": "Value" }, "u128": { "isComponent": false, "isResource": false, + "long_name": "u128", "short_name": "u128", - "title": "u128", "type": "uint", "typeInfo": "Value" }, "u16": { "isComponent": false, "isResource": false, + "long_name": "u16", "short_name": "u16", - "title": "u16", "type": "uint", "typeInfo": "Value" }, "u32": { "isComponent": false, "isResource": false, + "long_name": "u32", "short_name": "u32", - "title": "u32", "type": "uint", "typeInfo": "Value" }, "u64": { "isComponent": false, "isResource": false, + "long_name": "u64", "short_name": "u64", - "title": "u64", "type": "uint", "typeInfo": "Value" }, "u8": { "isComponent": false, "isResource": false, + "long_name": "u8", "short_name": "u8", - "title": "u8", "type": "uint", "typeInfo": "Value" }, "usize": { "isComponent": false, "isResource": false, + "long_name": "usize", "short_name": "usize", - "title": "usize", "type": "uint", "typeInfo": "Value" + }, + "uuid::Uuid": { + "isComponent": false, + "isResource": false, + "long_name": "uuid::Uuid", + "short_name": "Uuid", + "type": "object", + "typeInfo": "Value" } }, "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "bevy component registry schema" + "long_name": "bevy component registry schema" } \ No newline at end of file diff --git a/testing/bevy_example/assets/text/test.txt b/testing/bevy_example/assets/text/test.txt new file mode 100644 index 0000000..b649a9b --- /dev/null +++ b/testing/bevy_example/assets/text/test.txt @@ -0,0 +1 @@ +some text \ No newline at end of file diff --git a/testing/bevy_example/expected_screenshot.png b/testing/bevy_example/expected_screenshot.png deleted file mode 100644 index 94da691..0000000 Binary files a/testing/bevy_example/expected_screenshot.png and /dev/null differ diff --git a/testing/bevy_example/src/core/mod.rs b/testing/bevy_example/src/core/mod.rs index 339ea40..9383b36 100644 --- a/testing/bevy_example/src/core/mod.rs +++ b/testing/bevy_example/src/core/mod.rs @@ -1,20 +1,40 @@ -use bevy::prelude::*; -use bevy_gltf_blueprints::*; -use bevy_registry_export::*; +use std::any::TypeId; + +use bevy::{prelude::*, utils::HashSet}; +use blenvy::*; + +/*use bevy_gltf_blueprints::*; +use bevy_registry_export::*; */ + +use crate::{ComponentAToFilterOut, ComponentBToFilterOut}; pub struct CorePlugin; impl Plugin for CorePlugin { fn build(&self, app: &mut App) { - app.add_plugins(( - ExportRegistryPlugin::default(), - BlueprintsPlugin { - legacy_mode: false, - library_folder: "models/library".into(), - format: GltfFormat::GLB, - material_library: true, + app.add_plugins( + BlenvyPlugin { aabbs: true, + registry_component_filter: SceneFilter::Denylist(HashSet::from([ + // this is using Bevy's build in SceneFilter, you can compose what components you want to allow/deny + TypeId::of::(), + TypeId::of::(), + // and any other commponent you want to include/exclude + ])), ..Default::default() - }, - )); + }, /* ExportRegistryPlugin { + component_filter: SceneFilter::Denylist(HashSet::from([ + // this is using Bevy's build in SceneFilter, you can compose what components you want to allow/deny + TypeId::of::(), + TypeId::of::(), + // and any other commponent you want to include/exclude + ])), + ..Default::default() + }, + BlueprintsPlugin { + material_library: true, + aabbs: true, + ..Default::default() + }, */ + ); } } diff --git a/testing/bevy_example/src/dupe_components/mod.rs b/testing/bevy_example/src/dupe_components/mod.rs new file mode 100644 index 0000000..d1294f1 --- /dev/null +++ b/testing/bevy_example/src/dupe_components/mod.rs @@ -0,0 +1,13 @@ +use bevy::prelude::*; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub enum EnumTest { + Metal, + Wood, + Rock, + Cloth, + Squishy, + #[default] + None, +} diff --git a/testing/bevy_example/src/game/animation.rs b/testing/bevy_example/src/game/animation.rs new file mode 100644 index 0000000..225c0f9 --- /dev/null +++ b/testing/bevy_example/src/game/animation.rs @@ -0,0 +1,364 @@ +use std::time::Duration; + +/*use bevy_gltf_blueprints::{ + AnimationInfos, AnimationMarkerReached, BlueprintAnimationPlayerLink, BlueprintAnimations, + SceneAnimationPlayerLink, SceneAnimations, +};*/ + +use bevy::{animation::RepeatAnimation, gltf::Gltf, prelude::*}; + +use blenvy::{ + AnimationInfos, AnimationMarkerReached, BlueprintAnimationPlayerLink, BlueprintAnimations, + BlueprintInstanceDisabled, SceneAnimationPlayerLink, SceneAnimations, +}; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component for testing +pub struct Marker1; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component for testing +pub struct Marker2; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component for testing +pub struct Marker3; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component for testing; this is at the BLUEPRINT level +pub struct MarkerAllFoxes; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +/// flag component for testing; this is at the INSTANCE level +pub struct MarkerSpecificFox; + +/* +#[allow(clippy::type_complexity)] +pub fn animations( + added_animation_players: Query<(Entity, &Name, &AnimationPlayer)>, + added_animation_infos: Query<(Entity, &Name, &AnimationInfos), Added>, + animtest: Res, + mut commands: Commands, + assets_gltf: Res>, + parents: Query<&Parent>, +) { + for (entity, name, animation_infos) in added_animation_infos.iter() { + //println!("animated stuf {:?} on entity {}", animation_infos, name); + let gltf = assets_gltf.get(&animtest.0).unwrap(); + let mut matching_data = true; + for animation_info in &animation_infos.animations { + if !gltf.named_animations.contains_key(&animation_info.name) { + matching_data = false; + break; + } + } + if matching_data { + println!( + "inserting Animations components into {} ({:?})", + name, entity + ); + println!("Found match {:?}", gltf.named_animations); + commands.entity(entity).insert(SceneAnimations { + named_animations: gltf.named_animations.clone(), + }); + for ancestor in parents.iter_ancestors(entity) { + if added_animation_players.contains(ancestor) { + // println!("found match with animationPlayer !! {:?}",names.get(ancestor)); + commands + .entity(entity) + .insert(SceneAnimationPlayerLink(ancestor)); + } + // info!("{:?} is an ancestor of {:?}", ancestor, player); + } + } + } +}*/ + +pub fn check_animations( + // (&BlueprintAnimationPlayerLink, &BlueprintAnimations) + foxes: Query< + ( + Entity, + Option<&BlueprintAnimationPlayerLink>, + Option<&SceneAnimationPlayerLink>, + ), + (With, Without), + >, + + foo: Query< + ( + Entity, + Option<&BlueprintAnimationPlayerLink>, + Option<&SceneAnimationPlayerLink>, + ), + (With, Without), + >, + bar: Query< + ( + Entity, + Option<&BlueprintAnimationPlayerLink>, + Option<&SceneAnimationPlayerLink>, + ), + (With, Without), + >, + baz: Query< + ( + Entity, + Option<&BlueprintAnimationPlayerLink>, + Option<&SceneAnimationPlayerLink>, + ), + (With, Without), + >, + + bli: Query<(Entity, &AnimationInfos)>, + anim_players: Query<(Entity, &AnimationPlayer)>, + all_names: Query<&Name>, +) { + /*for bla in foxes.iter() { + println!("MarkerAllFoxes {:?} {:?} {:?}", all_names.get(bla.0), bla.1, bla.2) + } + for bla in foo.iter() { + println!("Marker1 {:?} {:?} {:?}", all_names.get(bla.0), bla.1, bla.2) + } + + for bla in bar.iter() { + println!("Marker2 {:?} {:?} {:?}", all_names.get(bla.0), bla.1, bla.2) + } + for bla in baz.iter() { + println!("Marker3 {:?} {:?} {:?}", all_names.get(bla.0), bla.1, bla.2) + } + println!(""); */ + /*for blo in bli.iter() { + println!("YOOOOO {:?}", all_names.get(blo.0)) + } + for anim in anim_players.iter() { + println!("Players {:?}", all_names.get(anim.0)) + }*/ +} + +#[allow(clippy::type_complexity)] +pub fn play_animations( + animated_foxes: Query< + (&BlueprintAnimationPlayerLink, &BlueprintAnimations), + With, + >, + animated_fox: Query< + (&BlueprintAnimationPlayerLink, &BlueprintAnimations), + With, + >, + + animated_marker1: Query< + (&SceneAnimationPlayerLink, &SceneAnimations), + (With, With), + >, + + animated_marker2: Query< + (&SceneAnimationPlayerLink, &SceneAnimations), + (With, With), + >, + + with_blueprint_and_scene_animations: Query< + ( + &SceneAnimationPlayerLink, + &SceneAnimations, + &BlueprintAnimationPlayerLink, + &BlueprintAnimations, + ), + (With, With), + >, + mut animation_players: Query<(&mut AnimationPlayer, &mut AnimationTransitions)>, + keycode: Res>, +) { + if keycode.just_pressed(KeyCode::KeyQ) { + println!("playing fox blueprint animation requested"); + for (link, animations) in animated_fox.iter() { + println!("BAR"); + + // println!("animations {:?}", animations.named_animations); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + let anim_name = "Survey"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + + /*let Some((&playing_animation_index, _)) = animation_player.playing_animations().next() else { + continue; + }; + let playing_animation = animation_player.animation_mut(playing_animation_index).unwrap(); + println!("Playing animation {:?}", playing_animation); + playing_animation.set_repeat(RepeatAnimation::Forever);*/ + } + println!(""); + } + + if keycode.just_pressed(KeyCode::KeyP) { + println!("playing fox blueprint animation requested"); + for (link, animations) in animated_foxes.iter() { + println!("FOO"); + + // println!("animations {:?}", animations.named_animations); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + let anim_name = "Run"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + + /*let Some((&playing_animation_index, _)) = animation_player.playing_animations().next() else { + continue; + }; + let playing_animation = animation_player.animation_mut(playing_animation_index).unwrap(); + println!("Playing animation {:?}", playing_animation); + playing_animation.set_repeat(RepeatAnimation::Forever);*/ + } + println!(""); + } + + if keycode.just_pressed(KeyCode::KeyO) { + println!("playing marker 3 blueprint animation requested"); + for (_, _, link, animations) in with_blueprint_and_scene_animations.iter() { + // This only works for entities that are spawned as part of the level, as scene animations are only there in that case + // println!("animations {:?}", animations.named_animations.keys()); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + let anim_name = "Walk"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + } + } + + if keycode.just_pressed(KeyCode::KeyI) { + println!("playing marker 3 scene animation requested"); + for (link, animations, _, _) in with_blueprint_and_scene_animations.iter() { + //println!("animations {:?}", animations.named_animations.keys()); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + let anim_name = "Blueprint8_move"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + } + } + + if keycode.just_pressed(KeyCode::KeyU) { + for (link, animations) in animated_marker1.iter() { + println!("animations {:?}", animations.named_animations); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + + let anim_name = "Blueprint1_move"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + } + } + if keycode.just_pressed(KeyCode::KeyY) { + for (link, animations) in animated_marker1.iter() { + println!("animations {:?}", animations.named_animations); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + + let anim_name = "Blueprint1_jump"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + } + } + if keycode.just_pressed(KeyCode::KeyT) { + for (link, animations) in animated_marker2.iter() { + println!("animations {:?}", animations.named_animations); + let (mut animation_player, mut animation_transitions) = + animation_players.get_mut(link.0).unwrap(); + + let anim_name = "Blueprint1_move"; + let animation_index = animations + .named_indices + .get(anim_name) + .expect("animation name should be in the list") + .clone(); + + animation_transitions + .play( + &mut animation_player, + animation_index, + Duration::from_secs(5), + ) + .repeat(); + } + } +} + +pub fn react_to_animation_markers( + mut animation_marker_events: EventReader, +) { + for event in animation_marker_events.read() { + println!("animation marker event {:?}", event) + } +} diff --git a/testing/bevy_example/src/game/in_game.rs b/testing/bevy_example/src/game/in_game.rs index a5cda69..6e51c48 100644 --- a/testing/bevy_example/src/game/in_game.rs +++ b/testing/bevy_example/src/game/in_game.rs @@ -1,8 +1,11 @@ +use crate::{GameState, InAppRunning}; use bevy::prelude::*; -use bevy_gltf_blueprints::{BluePrintBundle, BlueprintName, GameWorldTag}; -use bevy_gltf_worlflow_examples_common_rapier::{GameState, InAppRunning}; +use blenvy::{ + AddToGameWorld, BluePrintBundle, BlueprintInfo, DynamicBlueprintInstance, GameWorldTag, + HideUntilReady, SpawnBlueprint, +}; -use bevy_rapier3d::prelude::Velocity; +//use bevy_rapier3d::prelude::Velocity; use rand::Rng; pub fn setup_game( @@ -12,14 +15,13 @@ pub fn setup_game( ) { // here we actually spawn our game world/level commands.spawn(( - SceneBundle { - scene: asset_server.load("models/World.glb#Scene0"), - ..default() - }, - bevy::prelude::Name::from("world"), + BlueprintInfo::from_path("levels/World.glb"), + HideUntilReady, + SpawnBlueprint, GameWorldTag, InAppRunning, )); + next_game_state.set(GameState::InGame) } @@ -33,7 +35,7 @@ pub fn spawn_test( mut game_world: Query<(Entity, &Children), With>, ) { - if keycode.just_pressed(KeyCode::KeyT) { + if keycode.just_pressed(KeyCode::KeyS) { let world = game_world.single_mut(); let world = world.1[0]; @@ -53,19 +55,23 @@ pub fn spawn_test( let new_entity = commands .spawn(( BluePrintBundle { - blueprint: BlueprintName("Health_Pickup".to_string()), + blueprint: BlueprintInfo { + name: "spawned".into(), + path: "blueprints/Blueprint 3.gltf".into(), + }, // FIXME ..Default::default() }, + DynamicBlueprintInstance, bevy::prelude::Name::from(format!("test{}", name_index)), - // BlueprintName("Health_Pickup".to_string()), - // SpawnHere, + HideUntilReady, + AddToGameWorld, TransformBundle::from_transform(Transform::from_xyz(x, 2.0, y)), - Velocity { + /*Velocity { linvel: Vec3::new(vel_x, vel_y, vel_z), angvel: Vec3::new(0.0, 0.0, 0.0), - }, + },*/ )) .id(); - commands.entity(world).add_child(new_entity); + //commands.entity(world).add_child(new_entity); } } diff --git a/testing/bevy_example/src/game/mod.rs b/testing/bevy_example/src/game/mod.rs index 3f8dfb0..909e350 100644 --- a/testing/bevy_example/src/game/mod.rs +++ b/testing/bevy_example/src/game/mod.rs @@ -1,60 +1,59 @@ pub mod in_game; -use std::{ - fs::{self}, - time::Duration, -}; - -use bevy_gltf_blueprints::{AnimationPlayerLink, BlueprintName, BlueprintsList}; pub use in_game::*; +pub mod animation; +pub use animation::*; + +use std::{collections::HashMap, fs, time::Duration}; + +use blenvy::{ + BlueprintAnimationPlayerLink, BlueprintAssets, BlueprintEvent, BlueprintInfo, + GltfBlueprintsSet, SceneAnimations, +}; + +use crate::{AppState, GameState}; use bevy::{ prelude::*, render::view::screenshot::ScreenshotManager, time::common_conditions::on_timer, window::PrimaryWindow, }; -use bevy_gltf_worlflow_examples_common_rapier::{AppState, GameState}; -use crate::{TupleTestF32, UnitTest}; +use json_writer::to_json_string; fn start_game(mut next_app_state: ResMut>) { - next_app_state.set(AppState::AppLoading); + println!("START GAME"); + //next_app_state.set(AppState::AppLoading); + next_app_state.set(AppState::AppRunning); } // if the export from Blender worked correctly, we should have animations (simplified here by using AnimationPlayerLink) -// if the export from Blender worked correctly, we should have an Entity called "Cylinder" that has two components: UnitTest, TupleTestF32 -// if the export from Blender worked correctly, we should have an Entity called "Blueprint4_nested" that has a child called "Blueprint3" that has a "BlueprintName" component with value Blueprint3 -// if the export from Blender worked correctly, we should have a blueprints_list +// if the export from Blender worked correctly, we should have an Entity called "Blueprint4_nested" that has a child called "Blueprint3" that has a "BlueprintInfo" component with value Blueprint3 +// if the export from Blender worked correctly, we should have an assets_list +// if the export from Blender worked correctly, we should have the correct tree of entities #[allow(clippy::too_many_arguments)] +#[allow(clippy::type_complexity)] fn validate_export( parents: Query<&Parent>, children: Query<&Children>, names: Query<&Name>, - blueprints: Query<(Entity, &Name, &BlueprintName)>, - animation_player_links: Query<(Entity, &AnimationPlayerLink)>, - exported_cylinder: Query<(Entity, &Name, &UnitTest, &TupleTestF32)>, + blueprints: Query<(Entity, &Name, &BlueprintInfo)>, + animation_player_links: Query<(Entity, &BlueprintAnimationPlayerLink)>, + scene_animations: Query<(Entity, &SceneAnimations)>, empties_candidates: Query<(Entity, &Name, &GlobalTransform)>, - blueprints_list: Query<(Entity, &BlueprintsList)>, + assets_list: Query<(Entity, &BlueprintAssets)>, + root: Query<(Entity, &Name, &Children), (Without, With)>, ) { - let animations_found = !animation_player_links.is_empty(); - - let mut cylinder_found = false; - if let Ok(nested_cylinder) = exported_cylinder.get_single() { - let parent_name = names - .get(parents.get(nested_cylinder.0).unwrap().get()) - .unwrap(); - cylinder_found = parent_name.to_string() == *"Cube.001" - && nested_cylinder.1.to_string() == *"Cylinder" - && nested_cylinder.3 .0 == 75.1; - } + let animations_found = + !animation_player_links.is_empty() && scene_animations.into_iter().len() == 4; let mut nested_blueprint_found = false; - for (entity, name, blueprint_name) in blueprints.iter() { - if name.to_string() == *"Blueprint4_nested" && blueprint_name.0 == *"Blueprint4_nested" { + for (entity, name, blueprint_info) in blueprints.iter() { + if name.to_string() == *"Blueprint4_nested" && blueprint_info.name == *"Blueprint4_nested" { if let Ok(cur_children) = children.get(entity) { for child in cur_children.iter() { - if let Ok((_, child_name, child_blueprint_name)) = blueprints.get(*child) { + if let Ok((_, child_name, child_blueprint_info)) = blueprints.get(*child) { if child_name.to_string() == *"Blueprint3" - && child_blueprint_name.0 == *"Blueprint3" + && child_blueprint_info.name == *"Blueprint3" { nested_blueprint_found = true; } @@ -71,14 +70,46 @@ fn validate_export( break; } } + // check if there are assets_list components + let assets_list_found = !assets_list.is_empty(); - let blueprints_list_found = !blueprints_list.is_empty(); + // there should be no entity named xxx____bak as it means an error in the Blender side export process + let mut exported_names_correct = true; + for name in names.iter() { + if name.to_string().ends_with("___bak") { + exported_names_correct = false; + break; + } + } + + // generate parent/child "tree" + if !root.is_empty() { + let root = root.single(); + let mut tree: HashMap> = HashMap::new(); + + for child in children.iter_descendants(root.0) { + let child_name: String = names + .get(child) + .map_or(String::from("no_name"), |e| e.to_string()); //|e| e.to_string(), || "no_name".to_string()); + //println!(" child {}", child_name); + let parent = parents.get(child).unwrap(); + let parent_name: String = names + .get(parent.get()) + .map_or(String::from("no_name"), |e| e.to_string()); //|e| e.to_string(), || "no_name".to_string()); + tree.entry(parent_name) + .or_default() + .push(child_name.clone()); + } + + let hierarchy = to_json_string(&tree); + fs::write("bevy_hierarchy.json", hierarchy).expect("unable to write hierarchy file") + } fs::write( "bevy_diagnostics.json", format!( - "{{ \"animations\": {}, \"cylinder_found\": {} , \"nested_blueprint_found\": {}, \"empty_found\": {}, \"blueprints_list_found\": {} }}", - animations_found, cylinder_found, nested_blueprint_found, empty_found, blueprints_list_found + "{{ \"animations\": {}, \"nested_blueprint_found\": {}, \"empty_found\": {}, \"assets_list_found\": {}, \"exported_names_correct\": {} }}", + animations_found, nested_blueprint_found, empty_found, assets_list_found, exported_names_correct ), ) .expect("Unable to write file"); @@ -94,21 +125,72 @@ fn generate_screenshot( } fn exit_game(mut app_exit_events: ResMut>) { - app_exit_events.send(AppExit::Success); + app_exit_events.send(bevy::app::AppExit::Success); +} + +fn check_for_gltf_events( + mut blueprint_events: EventReader, + all_names: Query<&Name>, +) { + for event in blueprint_events.read() { + match event { + BlueprintEvent::InstanceReady { + entity, + blueprint_name, + blueprint_path, + } => { + info!( + "BLUEPRINT EVENT: {:?} for {:?}", + event, + all_names.get(*entity) + ); + } + BlueprintEvent::AssetsLoaded { + entity, + blueprint_name, + blueprint_path, + } => { + info!( + "BLUEPRINT EVENT: {:?} for {:?}", + event, + all_names.get(*entity) + ); + } + _ => { + info!("BLUEPRINT EVENT: {:?}", event); + } + } + } } pub struct GamePlugin; impl Plugin for GamePlugin { fn build(&self, app: &mut App) { - app.add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) - .add_systems(Update, validate_export) + app.register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + + .add_systems(Update, (spawn_test).run_if(in_state(GameState::InGame))) + .add_systems(Update, (validate_export, check_for_gltf_events)) + //.add_systems(OnEnter(AppState::CoreLoading), start_game) + .add_systems(OnEnter(AppState::MenuRunning), start_game) .add_systems(OnEnter(AppState::AppRunning), setup_game) - .add_systems(Update, generate_screenshot.run_if(on_timer(Duration::from_secs_f32(0.2)))) // TODO: run once + + /* .add_systems(Update, (animations) + .run_if(in_state(AppState::AppRunning)) + .after(GltfBlueprintsSet::AfterSpawn) + )*/ + .add_systems(Update, (play_animations, check_animations)) + //.add_systems(Update, react_to_animation_markers) + + /*.add_systems(Update, generate_screenshot.run_if(on_timer(Duration::from_secs_f32(0.2)))) // TODO: run once .add_systems( Update, exit_game.run_if(on_timer(Duration::from_secs_f32(0.5))), - ) // shut down the app after this time + ) // shut down the app after this time*/ ; } } diff --git a/testing/bevy_example/src/hierarchy_debug.rs b/testing/bevy_example/src/hierarchy_debug.rs new file mode 100644 index 0000000..7699c26 --- /dev/null +++ b/testing/bevy_example/src/hierarchy_debug.rs @@ -0,0 +1,195 @@ +use bevy::{ + gltf::{GltfMaterialExtras, GltfMeshExtras, GltfSceneExtras}, + prelude::*, +}; +use blenvy::{BlueprintAssets, BlueprintInstanceReady}; + +use crate::{BasicTest, EnumComplex, EnumTest, RedirectPropHitImpulse}; + +#[derive(Component)] +pub struct HiearchyDebugTag; + +pub fn setup_hierarchy_debug(mut commands: Commands, asset_server: Res) { + // a place to display the extras on screen + commands.spawn(( + TextBundle::from_section( + "", + TextStyle { + color: LinearRgba { + red: 1.0, + green: 1.0, + blue: 1.0, + alpha: 1.0, + } + .into(), + font_size: 15., + ..default() + }, + ) + .with_style(Style { + position_type: PositionType::Absolute, + top: Val::Px(12.0), + left: Val::Px(12.0), + ..default() + }), + HiearchyDebugTag, + )); +} + +pub fn get_descendants( + all_children: &Query<&Children>, + all_names: &Query<&Name>, + root: &Entity, + all_transforms: &Query<&Transform>, + all_global_transforms: &Query<&GlobalTransform>, + nesting: usize, + to_check: &Query<&EnumTest>, //&Query<(&BlueprintInstanceReady, &BlueprintAssets)>, +) -> String { + let mut hierarchy_display: Vec = vec![]; + let root_name = all_names.get(*root); + let name; + if root_name.is_ok() { + name = root_name.unwrap().to_string(); + } else { + name = "no_name".to_string() + } + + let mut component_display: String = "".into(); + let components_to_check = to_check.get(*root); + + if let Ok(compo) = to_check.get(*root) { + component_display = format!("{:?}", compo).clone(); + } + + hierarchy_display.push(format!( + "{}{} ====> {} ", + " ".repeat(nesting), + name, + component_display // all_transforms.get(*root), + //all_global_transforms.get(*root) + )); // ({:?}) // ({:?}) ({:?}) + + if let Ok(children) = all_children.get(*root) { + for child in children.iter() { + let child_descendants_display = get_descendants( + &all_children, + &all_names, + &child, + &all_transforms, + &all_global_transforms, + nesting + 4, + &to_check, + ); + hierarchy_display.push(child_descendants_display); + } + } + return hierarchy_display.join("\n"); +} + +pub fn draw_hierarchy_debug( + root: Query<(Entity, Option<&Name>, &Children), (Without)>, + all_children: Query<&Children>, + all_names: Query<&Name>, + all_transforms: Query<&Transform>, + all_global_transforms: Query<&GlobalTransform>, + + to_check: Query<&EnumTest>, //Query<(&BlueprintInstanceReady, &BlueprintAssets)>, + mut display: Query<&mut Text, With>, +) { + let mut hierarchy_display: Vec = vec![]; + + for (root_entity, name, children) in root.iter() { + // hierarchy_display.push( format!("Hierarchy root{:?}", name) ); + + hierarchy_display.push(get_descendants( + &all_children, + &all_names, + &root_entity, + &all_transforms, + &all_global_transforms, + 0, + &to_check, + )); + // let mut children = all_children.get(root_entity); + /*for child in children.iter() { + // hierarchy_display + let name = all_names.get(*child); //.unwrap_or(&Name::new("no name")); + hierarchy_display.push(format!(" {:?}", name)) + }*/ + + // + } + let mut display = display.single_mut(); + display.sections[0].value = hierarchy_display.join("\n"); +} + +////////:just some testing for gltf extras +fn check_for_gltf_extras( + gltf_extras_per_entity: Query<( + Entity, + Option<&Name>, + Option<&GltfSceneExtras>, + Option<&GltfExtras>, + Option<&GltfMeshExtras>, + Option<&GltfMaterialExtras>, + )>, + mut display: Query<&mut Text, With>, +) { + let mut gltf_extra_infos_lines: Vec = vec![]; + + for (id, name, scene_extras, extras, mesh_extras, material_extras) in + gltf_extras_per_entity.iter() + { + if scene_extras.is_some() + //|| extras.is_some() + || mesh_extras.is_some() + || material_extras.is_some() + { + let formatted_extras = format!( + "Extras per entity {} ('Name: {}'): +- scene extras: {:?} +- mesh extras: {:?} +- material extras: {:?} + ", + id, + name.unwrap_or(&Name::default()), + scene_extras, + //extras, + mesh_extras, + material_extras + ); + gltf_extra_infos_lines.push(formatted_extras); + } + let mut display = display.single_mut(); + display.sections[0].value = gltf_extra_infos_lines.join("\n"); + } +} + +fn check_for_component( + foo: Query<(Entity, Option<&Name>, &RedirectPropHitImpulse)>, + mut display: Query<&mut Text, With>, +) { + let mut info_lines: Vec = vec![]; + for (entiity, name, enum_complex) in foo.iter() { + let data = format!( + " We have a matching component: {:?} (on {:?})", + enum_complex, name + ); + info_lines.push(data); + println!("yoho component"); + } + let mut display = display.single_mut(); + display.sections[0].value = info_lines.join("\n"); +} + +pub struct HiearchyDebugPlugin; +impl Plugin for HiearchyDebugPlugin { + fn build(&self, app: &mut App) { + app + .add_systems(Startup, setup_hierarchy_debug) + //.add_systems(Update, check_for_component) + .add_systems(Update, draw_hierarchy_debug) + //.add_systems(Update, check_for_gltf_extras) + ; + } +} diff --git a/testing/bevy_example/src/main.rs b/testing/bevy_example/src/main.rs index 3c95987..5b4f508 100644 --- a/testing/bevy_example/src/main.rs +++ b/testing/bevy_example/src/main.rs @@ -1,5 +1,7 @@ use bevy::prelude::*; -use bevy_gltf_worlflow_examples_common_rapier::CommonPlugin; +// use bevy_gltf_worlflow_examples_common::CommonPlugin; +mod state; +use state::*; mod core; use crate::core::*; @@ -7,15 +9,21 @@ use crate::core::*; mod game; use game::*; +mod dupe_components; mod test_components; use test_components::*; +mod hierarchy_debug; +use hierarchy_debug::*; + fn main() { App::new() .add_plugins(( DefaultPlugins.set(AssetPlugin::default()), + HiearchyDebugPlugin, // our custom plugins - CommonPlugin, + // CommonPlugin, + StatePlugin, CorePlugin, // reusable plugins GamePlugin, // specific to our game ComponentsTestPlugin, // Showcases different type of components /structs diff --git a/examples/bevy_gltf_blueprints/animation/src/state.rs b/testing/bevy_example/src/state.rs similarity index 84% rename from examples/bevy_gltf_blueprints/animation/src/state.rs rename to testing/bevy_example/src/state.rs index 8e983d9..197ecc8 100644 --- a/examples/bevy_gltf_blueprints/animation/src/state.rs +++ b/testing/bevy_example/src/state.rs @@ -1,17 +1,13 @@ -use bevy::app::AppExit; use bevy::prelude::*; #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Default, States)] pub enum AppState { - #[default] CoreLoading, + #[default] MenuRunning, AppLoading, AppRunning, AppEnding, - - // FIXME: not sure - LoadingGame, } #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Default, States)] @@ -34,21 +30,28 @@ pub struct InCoreLoading; #[derive(Component, Default)] pub struct InMenuRunning; #[derive(Component)] -pub struct InAppLoading; -#[derive(Component)] + pub struct InAppRunning; // components for tagging in game vs in game menu stuff #[derive(Component, Default)] pub struct InMainMenu; + #[derive(Component, Default)] pub struct InMenu; + #[derive(Component, Default)] pub struct InGame; +#[derive(Component, Default)] +pub struct InGameSaving; + +#[derive(Component, Default)] +pub struct InGameLoading; + pub struct StatePlugin; impl Plugin for StatePlugin { fn build(&self, app: &mut App) { - app.add_state::().add_state::(); + app.init_state::().init_state::(); } } diff --git a/testing/bevy_example/src/test_components.rs b/testing/bevy_example/src/test_components.rs index 8c340e1..d54ef0c 100644 --- a/testing/bevy_example/src/test_components.rs +++ b/testing/bevy_example/src/test_components.rs @@ -1,3 +1,4 @@ +use crate::dupe_components; use bevy::{ pbr::{ExtendedMaterial, MaterialExtension}, prelude::*, @@ -116,6 +117,10 @@ pub struct VecOfVec3s2(Vec); #[reflect(Component)] pub struct VecOfColors(Vec); +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct VecOfUints(Vec); + #[derive(Component, Reflect, Default, Debug)] #[reflect(Component)] pub struct AAAAddedCOMPONENT; @@ -151,6 +156,79 @@ impl MaterialExtension for MyExtension { } } +use bevy::utils::HashMap; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestSimple { + pub named_animations: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestStringFloat { + pub named_animations: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestIntString { + pub named_animations: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestIntColor { + pub inner: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestStringColor { + pub inner: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestStringEnum { + pub inner: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestStringStruct { + pub inner: HashMap, +} + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct HashmapTestStringColorFlat(HashMap); + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct ComponentAToFilterOut; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct ComponentBToFilterOut; + +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct ComponentWithFieldsOfIdenticalType { + pub first: f32, + pub second: f32, + pub third: Vec, + pub fourth: Vec, +} +#[derive(Component, Reflect, Default, Debug)] +#[reflect(Component)] +pub struct ComponentWithFieldsOfIdenticalType2(f32, f32, f32); + +#[derive(Debug, Clone, Copy, PartialEq, Reflect, Component)] +#[reflect(Component)] +pub enum RedirectPropHitImpulse { + Local(Vec3), +} pub struct ComponentsTestPlugin; impl Plugin for ComponentsTestPlugin { fn build(&self, app: &mut App) { @@ -164,6 +242,7 @@ impl Plugin for ComponentsTestPlugin { .register_type::() .register_type::() .register_type::() + .register_type::() .register_type::() .register_type::() .register_type::>() @@ -181,8 +260,29 @@ impl Plugin for ComponentsTestPlugin { .register_type::>() .register_type::() .register_type::>() + .register_type::() + .register_type::>() + .register_type::() // .register_type::() .register_type::() + .register_type::>() + .register_type::() + .register_type::>() + .register_type::() + .register_type::>() + .register_type::() + .register_type::>() + .register_type::() + .register_type::>() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() + .register_type::() .add_plugins(MaterialPlugin::< ExtendedMaterial, >::default()); diff --git a/tools/bevy_components/README.md b/tools/bevy_components/README.md deleted file mode 100644 index 623712f..0000000 --- a/tools/bevy_components/README.md +++ /dev/null @@ -1,303 +0,0 @@ -# Bevy components - -This [Blender addon](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/bevy_components) gives you an easy to use UI to add and configure your [Bevy](https://bevyengine.org/) components inside Blender ! - -- **automatically generates a simple UI** to add/configure components based on a **registry schema** file (an export of all your Bevy components's information, generated) -by the [bevy_registry_export](https://crates.io/crates/bevy_registry_export) crate/plugin -- no more need to specify components manually using custom_properties, with error prone naming etc -- adds **metadata** to objects containing information about what components it uses + some extra information -- uses Blender's **PropertyGroups** to generate custom UIs & connects those groups with the custom properties so that no matter the complexity -of your Bevy components you get a nicely packed custom_property to use with ... -- the ideal companion to the [gltf_auto_export](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/gltf_auto_export) to embed your Bevy components inside your gltf files - - - -> Important: - the tooling is still in the early stages, even if it is feature complete : use with caution!. - -> IMPORTANT !! if you have previously used v0.1 , v0.2 had a breaking change, please see [this](#regenerate-ui-values) section on how to upgrade your data to v0.2.\ -This problem should not be present going forward - -> IMPORTANT !! if you have previously used v0.2 , v0.3 had a breaking change, please see [this](#regenerate-custom-property-values) section on how to upgrade your data to v0.3. - -## Installation: - -* grab the latest release zip file from the releases tab (choose the bevy_components releases !) - - - -* in Blender go to edit => preferences => install - -![blender addon install](./docs/blender_addon_install.png) - -* choose the path where ```bevy_components.zip``` is stored - -![blender addon install](./docs/blender_addon_install2.png) - - -## Configuration & overview - -Before you can use the add-on you need to configure it - -### Bevy side - - - setup [bevy_registry_export](https://crates.io/crates/bevy_registry_export) for your project (see the crate's documentation for that), and compile/run it to get the ```registry.json``` file - -### Blender side - -- Go to the new Bevy Components tab in the 3D view - -![configuration](./docs/configuration.png) - -- click on the button to select your registry.json file (in the "configuration" panel) - -![configuration 2](./docs/configuration2.png) - -- the list of available components will appear - -![configuration 3](./docs/configuration3.png) - - #### registry file polling - - - * by default, the add-on will check for changes in your registry file every second, and refresh the UI accordingly - * you can set the polling frequency or turn it off if you do not want auto-refresh - - ![registry file polling](./docs/registry_polling.png) - - - -## Use - - -### Existing components & custom properties - -* If you already have components defined manualy in Blender inside **custom properties** you will need to define them again using the UI! -* avoid mixing & matching: if you change the values of **custom properties** that also have a component, the custom property will be **overriden** every time -you change the component's value -* you can of course still use non component custom properties as always, this add-on will only impact those that have corresponding Bevy components - -### adding components - -- to add a component, select an object and then select the component from the components list: (the full type information will be displayed as tooltip) - -![components list](./docs/components_list.png) - -- click on the dropdown to get the full list of available components - -![components list](./docs/components_list2.png) - -- you can also filter components by name for convenience - -![filter components](./docs/filter_components.png) - - -- add a component by clicking on the "add component" button once you have selected your desired component - - it will appear in the component list for that object - -![add component](./docs/add_component.png) - -### edit components - -- to edit a component's value just use the UI: - -![edit component](./docs/edit_component.png) - -it will automatically update the value of the corresponding custom property - -![edit component](./docs/edit_component2.png) - -### Create components from custom properties - -- IF you have a valid component type and the correct corresponding RON string in the custom_property value (this button will not appear if not), this add-on can automatically -generate the corresponding component for you: - -- Fill/check your custom property (here for Aabb) - -![generate_components 2](./docs/generate_components2.png) - -- click on the button - -![generate_components](./docs/generate_components.png) - --voila ! - -![generate_components 3](./docs/generate_components3.png) - - -### copy & pasting - -- you can also copy & paste components between objects - -- click on the "copy component button" of the component you want to copy - -![copy component](./docs/copy_component.png) - -- then select the object you want to copy the component (& its value) to, and click on the paste button. - -It will add the component to the select object - -![paste component](./docs/paste_component.png) - -> if the target object already has the same component, its values will be overwritten - - -## Additional components UI features - -- for large/ complex components you can toggle the details of that component: - -![toggle details](./docs/toggle_details.png) - - -## Supported components - -- normally (minus any bugs, please report those!) all components using **registered** types should be useable and editable -- this includes (non exhaustive list): - * enums (even complex ones !) - - ![enums](./docs/enums.png) - - ![enums](./docs/enums2.png) - - - * complex structs, with various types of fields (including nested ones) - - ![complex](./docs/complex_components2.png) - - * lists/ vecs (here a vec of tuples) - - ![lists](./docs/vecs_lists.png) - - * etc ! - -## Unregistered types & error handling - -- non registered types can be viewed in this panel : (can be practical to see if you have any missing registrations too!) - - ![unregistered types](./docs/unregistered_types.png) - -- if you have a component made up of unregistered structs/enums etc, you will get visual feedback & the component will be deactivated - - ![invalid component](./docs/invalid_components.png) - - > see [here](#invalidunregistered-type-renaming--conversion) for ways to convert invalid / unregistered components to other types. - - -- if you are encountering this type of view: don't panic your component data is not gone ! It just means you need to reload the registry data by clicking on the relevant button - - ![missing registry data](./docs/missing_registry_data.png) - - - -## Advanced Tools - -In this section you will find various additional more advanced tooling - -### Invalid/unregistered type renaming / conversion - -If you have components that are - * invalid : ie some error was diagnosed - * unregistered: a custom property is present on the object, but there is no matching type in the registry - -Here you will get an overview, of ALL invalid and unregistered components in your Blender project, so you can find them, rename/convert them, -or delete them, also in bulk - -![component rename overview](./docs/component_rename_overview2.png) - -* you can click on the button to select the object in your outliner (this also works across scenes, so you will be taken to the scene where the -given object is located) - -![update custom properties](./docs/component_rename_object_select.png) - - -#### Single object component renaming/ conversion - - - to rename/convert a single component for a single object: - - * go to the row of the object you want to convert the component of - * in the dropdown menu, choose the target component - * click on the button with the magic wand to convert the component - - ![single rename](./docs/component_rename_single.png) - - > the tool will attempt to automatically convert the source component, including the field names/values, if the target component has the same ones - If it fails to do the conversion, you will get an error message, and you will either have to change the custom property yourself, or you can simply - change the values in the UI, which will automatically generate the custom property value - - - to delete a single component for a single object: - - * go to the row of the object you want to remove the component from - * click on the button with the "x" to remove the component - - ![single delete](./docs/component_remove_single.png) - -#### Bulk component renaming/ conversion - - - use this method if you want to convert ALL components of a given type of ALL objects - - * click on this button to pick your source component - - ![bulk convert remove](./docs/component_rename_remove_bulk.png) - - * for conversion: in the dropdown menu, choose the target component & click apply to convert all matching components - * for deletion: clic on the "x" to remove all matching components - - ![bulk convert remove](./docs/component_rename_remove_bulk2.png) - - - ### For conversion between custom properties & components & vice-versa - - #### regenerate custom property values - - - "update custom properties of current object" : will go over **all components** that you have defined for the **currently selected object**, and re-generate the - - corresponding custom property values - - ![update custom properties](./docs/other_options.png) - - - - "update custom properties of ALL objects" : same as above but it will do so for the **ALL objects in your blend file** (so can be slow!), and re-generate the - - corresponding custom property values - - ![update custom properties for all](./docs/other_options2.png) - - > IMPORTANT !! use this if you have previously used v0.1 or v0.2 , as v0.3 had a breaking change, that makes it **necessary** to use this **once** to upgrade components data - You should also re-export your gltf files , otherwise you might run into issues - - - #### regenerate component/ UI values - - - since v0.2, you have the option to regenerate (for the selected object or all objects, as above) to regenerate your UI values from the custom property values - - ![update UI FROM custom properties](./docs/update_ui_from_custom_properties.png) - - > IMPORTANT !! use this if you have previously used v0.1 , as v0.2 had a breaking change, that makes it **necessary** to use this **once** to upgrade the UI data - - -## Additional important information - - -- for the components to work correctly with [```bevy_gltf_components```](https://crates.io/crates/bevy_gltf_components) or [```bevy_gltf_blueprints```](https://crates.io/crates/bevy_gltf_blueprints) you will need to set the ```legacy_mode``` for those plugins to **FALSE** -as the component data generated by this add on is a complete, clean **ron** data that is incompatible with the previous (legacy versions). -Please see the documentation of those crates for more information. - -> Note: the legacy mode support will be dropped in future versions, and the default behaviour will be NO legacy mode - - -## Examples - -you can find an example [here](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/bevy_registry_export/) - -## Known issues & limitations: - -* **Range** data (ie ```Range``` etc) are not handled at this time (issue seems to be on the Bevy side) -* **Entity** structs are always set to 0 (setting entity values on the Blender side at this time does not make much sense anyway) - -## License - -This tool, all its code, contents & assets is Dual-licensed under either of - -- Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE_APACHE.md) or https://www.apache.org/licenses/LICENSE-2.0) -- MIT license ([LICENSE-MIT](../LICENSE_MIT.md) or https://opensource.org/licenses/MIT) \ No newline at end of file diff --git a/tools/bevy_components/TODO.md b/tools/bevy_components/TODO.md deleted file mode 100644 index 0fa7f88..0000000 --- a/tools/bevy_components/TODO.md +++ /dev/null @@ -1,209 +0,0 @@ -Basics -- [x] add panel -- [x] add a "create blueprint" button - - [x] when clicked: - - [x] create collection - - [x] add an empty inside collection and name it _components - - [x] add a **AutoExport** Boolean property to collection - - [x] add name imput(popup for name input ?) - -- [x] add a list of existing components/custom properties -- [x] add an "edit blueprint" section - - [x] only filled when there is ONE selection, and that selection is a collection - - [x] add a dropdown of possible components - - [x] add a checkbox for enabling disabling a component (enabled by default) - - [x] add a button for copying a component - - [x] add a button for pasting a component - - -UI: - - [x] filterable list of components to DISPLAY for selection : ComponentDefinitionsList - -- Filter out invalid objects for components that have no _components suffix ? (that is too limiting I think) -- -[x] How to deal with pre-existing custom properties that have NO metadata - * if there is one without metadata: find if there is an available component with the same name & type ? - * if there is , insert metadata - * otherwise, mark it in some way visually ? - -- [x] for OBJECT enums: add two ui pieces - - [x] one for selecting the TYPE to choose (ie normal enum) - - [x] one for setting the VALUE inside that - - -- [x] vecs => (not vec2, vec3 etc) more complex UI to add items in a list - - [x] generate contained CollectionGroup - - [x] CollectionProperty => type = the above -- [x] find ways to "collapse" the different levels of nested data of structs/tupples into a single custom property (ideally on the fly, but we can do without) - -- [x] for single tupple components that represent a single unit type, re_use the base type's UIPropertyGroup instead of creating specific ones (ie TuppleTestF32_ui...) => will not work, would cause overriden "update callback" -- [x] pre_generate default values/values for each main type - -- [x] fix issues with vec2 etc not having the correct number of items -- [x] fix bad defaults in ui group -- [x] fix object enums handling on updates (??) -- [x] fix issues with lambads in loops - -- [x] object enum should be (params) - ie *Collider: - * Cuboid(Vec3) - * Sphere(radius) -- [x] deal with enums variants that do not have any data: ex { - "title": "Mesh" - } - -- [x] remove / change use of ComponentDefinitionsList - - when filling the list, use the long_name as index ie items.append((str(index), item.name, item.long_name)) => items.append((item.long_name, item.name, item.long_name)) -- [x] when removing a component, reset the value of the attribute in the property group (or not ? could be a feature) -- [x] deal correctly with fields of types that are NOT in the schema.json (for ex PlayingAnimation in AnimationPlayer) -- [ ] deal correctly with complex types - CascadeShadowConfig: has an array/list - ClusterConfig: one of the enum variants is an object -- [ ] possibly allow Color to be an enum as it should be ? -- [x] for sub items , the update functions "Name" should be the one of the root object -- [x] fix copy & pasting - - it actually works, but the value of the custom property are not copied back to the UI, need to implement property_group_value_from_custom_property_value -- [ ] we need a notion of "root propertyGroup" =? -- [x] notify user of missing entries in schema (ie , unregistered data types) -- [x] clarify propgroup_ui vs named nested fields -- [x] fix basic enums handling -- [x] add a list of not found components to the registry, add to them on the fly -- [x] add configuration panel (open the first time, closed on further user once configured) - -- [x] add limits to ixxx types vs utypes -- [x] only display the "generate components xx" when relevant ie: - - go through list of custom properties in current object - - if one does not have metadata and / or propgroup: - break - -- [x] remove custom property of disabled component ? => NOpe, as we need custom properties to iterate over -- [x] what to do with components with n/a fields ? perhaps disable the component ? add a "invalid" field to meta ? -- [x] format output as correct RON - - [x] fix issue with empty strings -- [x] change custom property => propGroup to convert RON => Json first => obsolete -- [x] cleanup process_lists - -- [x] fix issues with enum variants with only a title - -- [x] display single item enums inline, others in a seperate row - -- [x] add button to "apply all" (in configuration), to apply/update all custom properties to ALL objects where relevant -- [x] add button to "apply to current" to do the same with current -- [x] add warning sign to the above - -- [x] what about metadata ? -- [x] only upgrade custom properties to metadata when asked/relevant -- [x] implement move list up/down -- [ ] change property_group_value_from_custom_property_value => just disregard it for now, its point is very limited (helping people with old custom properties by attempting to generate real values) - and give the change to a real ron format, it is too limiting -- [x] fix reload registry clearing list of missing types -- [x] clean up metadata module, a lot of repeated code -- [x] some fields when original is 0 or 0.0 are not copyable ? (seems like a bad boolean check ) -- [x] fix issues with object variants in enums (see clusterconfig) - - -- perhaps directly export default values within the schema.json ? - - for most types , it is straighforward, but others, not so much: like the default color in Bevy , etc - -- [x] change default schema.json to registry.json -- [x] pasted components do not get updated value in custom_property -- [x] finish documentation -- [x] add storage of registry path - - [x] save after setting the data (browse for) - - [x] load after each reload ? - -# Additional - - [x] check if output "string" in custom properties are correct - - - gltf_auto_export - - [ ] add support for "enabled" flag - - [ ] add special components - - "AutoExport" => Needed - - "Dynamic" ? naah wait that should be exported by the Bevy side - - [ ] filter out Components_meta ?? - - [x] add legacy mode to the persisted parameters - - - bevy_gltf_components: - - [x] first release patch for current issues - - [x] make configurable - - [x] add "compatibility mode" and deprecation warnings for the current hack-ish conversion of fake ron - - [x] update docs to show we need to use ComponentsFromGltfPlugin::default - - - bevy_gltf_blueprints - - [x] update dependency - - [x] update version - - [x] add ability to set legacy mode for bevy_gltf_components ? - - - [x] release all versions - - [x] update main documentation, add compatibility version grid - - -## Phase 2 - -- [x] fix handling of long component names - - [x] fix nesting level handling issue for new system : ie basic component DOES NOT work, but nestedLevel2 does - - add goddam tests ! - - [ ] verify some weird prop => custom property values (Calculated Clip for example) - -- [x] fix "reload registry" not clearing all previous data (reloading registry does not seem to account for added/removed components in the registry ) -- add file watcher for registry - - [x] have the watcher work as expected - - [ ] add handling of removed registry file - - [ ] clear & reset handler when the file browser for the registry is used -- [ ] re-enable watcher - -- tests - clear && pytest -svv --blender-executable /blender/blender-4.0.2-linux-x64/blender - - - [x] load registry - - just check list of components vs lists in registry - - [x] try adding all components - - [x] select an object - - [x] call the add_component operator - - - [x] change params - - use field names + component definitions to set values - - [x] find a way to shuffle params of ALL components based on a reliable, repeatable seed - - - [x] test propgroup values => custom property values - - [x] test custom property value => propgroup value - - - check if all went well - - - [x] fix issues with incorect custom_property generation - - [x] fix issue with object variants for enums - - - [ ] add handling for core::ops::Range & other ranges - - [x] add handling for alloc::borrow::Cow - - [x] add handling of isize - - - [x] indirection level - - currently - - short_name +_"ui => direct lookup - - problem : max 64 chars for propertyGroupNames - - possible solution - - propertyGroupName storage: simple , incremented INT (call it propGroupId for ex) - - lookup shortName => propGroupId - - - do a first pass, by replacing manual propGroupNames creation with a function - - in a second pass, replace the innards - -- add button to regenerate cutom prop values from custom properties (allows us to sidestep any future issues with internals changing) - - [x] fix lists - - [x] fix enums (see Clusterconfig) - - [x] need an example with one tupple one struct - - [x] projection - - [x] additionalmassproperties - - [x] fix tupleStructs (see TupleVecF32F32) => always the same problem of having us pre-parse data without knowing what we have inside - - find a way to only split by level 0 (highest level) nesting "," seperators, ignoring any level of nesting until we dig one level deeper - - solve nesting level use issues - -- [x] remove metadata when deleting components -- [x] add try catch around custom_prop => propGroup -- [x] enhance the GenerateComponent_From_custom_property_Operator to use the new system to actually generate the stuff - -- coherence in operators: - - component_name vs component_type - - [x] delete => remove - -- [x] clean up reloading of registry settings -- [x] clean up file watcher \ No newline at end of file diff --git a/tools/bevy_components/__init__.py b/tools/bevy_components/__init__.py deleted file mode 100644 index 1683a96..0000000 --- a/tools/bevy_components/__init__.py +++ /dev/null @@ -1,149 +0,0 @@ -bl_info = { - "name": "bevy_components", - "author": "kaosigh", - "version": (0, 4, 2), - "blender": (3, 4, 0), - "location": "VIEW_3D", - "description": "UI to help create Bevy blueprints and components", - "warning": "", - "wiki_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow", - "tracker_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow/issues/new", - "category": "User Interface" -} - -import bpy -from bpy.props import (StringProperty) - -from .helpers import load_settings -from .blueprints import CreateBlueprintOperator -from .components.operators import CopyComponentOperator, Fix_Component_Operator, OT_rename_component, RemoveComponentFromAllObjectsOperator, RemoveComponentOperator, GenerateComponent_From_custom_property_Operator, PasteComponentOperator, AddComponentOperator, RenameHelper, Toggle_ComponentVisibility - -from .registry.registry import ComponentsRegistry,MissingBevyType -from .registry.operators import (COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_ALL, COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_CURRENT, COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_ALL, COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_CURRENT, OT_select_component_name_to_replace, OT_select_object, ReloadRegistryOperator, OT_OpenFilebrowser) -from .registry.ui import (BEVY_COMPONENTS_PT_Configuration, BEVY_COMPONENTS_PT_AdvancedToolsPanel, BEVY_COMPONENTS_PT_MissingTypesPanel, MISSING_TYPES_UL_List) - -from .components.metadata import (ComponentMetadata, ComponentsMeta, ensure_metadata_for_all_objects) -from .propGroups.prop_groups import (generate_propertyGroups_for_components) -from .components.lists import GENERIC_LIST_OT_actions, Generic_LIST_OT_AddItem, Generic_LIST_OT_RemoveItem, Generic_LIST_OT_SelectItem -from .components.definitions_list import (ComponentDefinitionsList, ClearComponentDefinitionsList) -from .components.ui import (BEVY_COMPONENTS_PT_ComponentsPanel) - - -# just a test, remove -def scan_item(item, nesting=0): - try: - for sub in dict(item).keys(): - print("--", sub, getattr(item[sub], "type_name", None), item[sub], nesting) - try: - scan_item(item[sub], nesting+1) - except: - pass - except: - pass - -class BEVY_COMPONENTS_PT_MainPanel(bpy.types.Panel): - bl_idname = "BEVY_COMPONENTS_PT_MainPanel" - bl_label = "" - bl_space_type = 'VIEW_3D' - bl_region_type = 'UI' - bl_category = "Bevy Components" - bl_context = "objectmode" - - - def draw_header(self, context): - layout = self.layout - name = context.object.name if context.object != None else '' - layout.label(text="Components For "+ name) - - def draw(self, context): - layout = self.layout - object = context.object - collection = context.collection - - - """row.prop(bpy.context.window_manager, "blueprint_name") - op = row.operator(CreateBlueprintOperator.bl_idname, text="Create blueprint", icon="CONSOLE") - op.blueprint_name = bpy.context.window_manager.blueprint_name - layout.separator() - - current_components_container = None - has_components = False - for child in collection.objects: - if child.name.endswith("_components"): - has_components = True - current_components_container= child - - if collection is not None and has_components: - layout.label(text="Edit blueprint: "+ collection.name) - - """ - - - -#_register, _unregister = bpy.utils.register_classes_factory(classes) -classes = [ - CreateBlueprintOperator, - AddComponentOperator, - CopyComponentOperator, - PasteComponentOperator, - RemoveComponentOperator, - RemoveComponentFromAllObjectsOperator, - Fix_Component_Operator, - OT_rename_component, - RenameHelper, - GenerateComponent_From_custom_property_Operator, - Toggle_ComponentVisibility, - - ComponentDefinitionsList, - ClearComponentDefinitionsList, - - ComponentMetadata, - ComponentsMeta, - MissingBevyType, - ComponentsRegistry, - - OT_OpenFilebrowser, - ReloadRegistryOperator, - COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_ALL, - COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_CURRENT, - - COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_ALL, - COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_CURRENT, - - OT_select_object, - OT_select_component_name_to_replace, - - BEVY_COMPONENTS_PT_MainPanel, - BEVY_COMPONENTS_PT_ComponentsPanel, - BEVY_COMPONENTS_PT_AdvancedToolsPanel, - BEVY_COMPONENTS_PT_Configuration, - MISSING_TYPES_UL_List, - BEVY_COMPONENTS_PT_MissingTypesPanel, - - Generic_LIST_OT_SelectItem, - Generic_LIST_OT_AddItem, - Generic_LIST_OT_RemoveItem, - GENERIC_LIST_OT_actions -] - -from bpy.app.handlers import persistent - -@persistent -def post_load(file_name): - registry = bpy.context.window_manager.components_registry - if registry != None: - registry.load_settings() - -def register(): - for cls in classes: - bpy.utils.register_class(cls) - bpy.types.WindowManager.blueprint_name = StringProperty() - bpy.app.handlers.load_post.append(post_load) - -def unregister(): - for cls in classes: - bpy.utils.unregister_class(cls) - del bpy.types.WindowManager.blueprint_name - - bpy.app.handlers.load_post.remove(post_load) - diff --git a/tools/bevy_components/blueprints.py b/tools/bevy_components/blueprints.py deleted file mode 100644 index c4deec4..0000000 --- a/tools/bevy_components/blueprints.py +++ /dev/null @@ -1,41 +0,0 @@ - -import json -import bpy -from bpy_types import Operator -from bpy.props import (StringProperty) - -from .helpers import make_empty - -class CreateBlueprintOperator(Operator): - """Creates blueprint""" - bl_idname = "object.simple_operator" - bl_label = "Simple Object Operator" - - blueprint_name: StringProperty( - name="blueprint name", - description="blueprint name to add", - default="NewBlueprint" - ) - - - def execute(self, context): - blueprint_name = self.blueprint_name - if blueprint_name == '': - blueprint_name = "NewBlueprint" - collection = bpy.data.collections.new(blueprint_name) - bpy.context.scene.collection.children.link(collection) - collection['AutoExport'] = True - - # this is in order to deal with automatic naming - blueprint_name = collection.name - - components_empty = make_empty(blueprint_name + "_components", [0,0,0], [0,0,0], [0,0,0], bpy.context.scene.collection) - bpy.ops.collection.objects_remove_all() - - collection.objects.link(components_empty) - - components_empty.select_set(True) - bpy.context.view_layer.objects.active = components_empty - - return {'FINISHED'} - diff --git a/tools/bevy_components/components/definitions_list.py b/tools/bevy_components/components/definitions_list.py deleted file mode 100644 index 4ad8137..0000000 --- a/tools/bevy_components/components/definitions_list.py +++ /dev/null @@ -1,56 +0,0 @@ -import bpy -from bpy.props import (StringProperty) - -# this one is for UI only, and its inner list contains a useable list of shortnames of components -class ComponentDefinitionsList(bpy.types.PropertyGroup): - - # FIXME: not sure, hard coded exclude list, feels wrong - exclude = ['Parent', 'Children'] - - def add_component_to_ui_list(self, context): - #print("add components to ui_list") - items = [] - type_infos = context.window_manager.components_registry.type_infos - short_names = context.window_manager.components_registry.short_names_to_long_names - for short_name in sorted(short_names.keys()): - long_name = short_names[short_name] - definition = type_infos[long_name] - is_component = definition['isComponent'] if "isComponent" in definition else False - - if self.filter in short_name and is_component: - if not 'Handle' in short_name and not "Cow" in short_name and not "AssetId" in short_name and short_name not in self.exclude: # FIXME: hard coded, seems wrong - items.append((long_name, short_name, long_name)) - return items - - @classmethod - def register(cls): - bpy.types.WindowManager.components_list = bpy.props.PointerProperty(type=ComponentDefinitionsList) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.components_list - - list : bpy.props.EnumProperty( - name="list", - description="list", - # items argument required to initialize, just filled with empty values - items = add_component_to_ui_list, - ) - filter: StringProperty( - name="component filter", - description="filter for the components list", - options={'TEXTEDIT_UPDATE'} - ) - - -class ClearComponentDefinitionsList(bpy.types.Operator): - ''' clear list of bpy.context.collection.component_definitions ''' - bl_label = "clear component definitions" - bl_idname = "components.clear_component_definitions" - - def execute(self, context): - # create a new item, assign its properties - bpy.context.collection.component_definitions.clear() - - return {'FINISHED'} - diff --git a/tools/bevy_components/components/lists.py b/tools/bevy_components/components/lists.py deleted file mode 100644 index f16421d..0000000 --- a/tools/bevy_components/components/lists.py +++ /dev/null @@ -1,170 +0,0 @@ -import json -from bpy_types import Operator, UIList -from bpy.props import (StringProperty, EnumProperty, PointerProperty, FloatVectorProperty, IntProperty) - -class Generic_LIST_OT_AddItem(Operator): - """Add a new item to the list.""" - bl_idname = "generic_list.add_item" - bl_label = "Add a new item" - - property_group_path: StringProperty( - name="property group path", - description="", - ) - - component_name: StringProperty( - name="component name", - description="", - ) - - def execute(self, context): - print("") - object = context.object - # information is stored in component meta - components_in_object = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == self.component_name, components_in_object), None) - - propertyGroup = component_meta - for path_item in json.loads(self.property_group_path): - propertyGroup = getattr(propertyGroup, path_item) - - print("list container", propertyGroup, dict(propertyGroup)) - target_list = getattr(propertyGroup, "list") - index = getattr(propertyGroup, "list_index") - item = target_list.add() - propertyGroup.list_index = index + 1 # we use this to force the change detection - - print("added item", item, item.field_names, getattr(item, "field_names")) - print("") - return{'FINISHED'} - - -class Generic_LIST_OT_RemoveItem(Operator): - """Remove an item to the list.""" - bl_idname = "generic_list.remove_item" - bl_label = "Remove selected item" - - property_group_path: StringProperty( - name="property group path", - description="", - ) - - component_name: StringProperty( - name="component name", - description="", - ) - def execute(self, context): - print("remove from list", context.object) - - object = context.object - # information is stored in component meta - components_in_object = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == self.component_name, components_in_object), None) - - propertyGroup = component_meta - for path_item in json.loads(self.property_group_path): - propertyGroup = getattr(propertyGroup, path_item) - - target_list = getattr(propertyGroup, "list") - index = getattr(propertyGroup, "list_index") - target_list.remove(index) - propertyGroup.list_index = min(max(0, index - 1), len(target_list) - 1) - return{'FINISHED'} - - -class Generic_LIST_OT_SelectItem(Operator): - """Remove an item to the list.""" - bl_idname = "generic_list.select_item" - bl_label = "select an item" - - - property_group_path: StringProperty( - name="property group path", - description="", - ) - - component_name: StringProperty( - name="component name", - description="", - ) - - selection_index: IntProperty() - - def execute(self, context): - print("select in list", context.object) - - object = context.object - # information is stored in component meta - components_in_object = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == self.component_name, components_in_object), None) - - propertyGroup = component_meta - for path_item in json.loads(self.property_group_path): - propertyGroup = getattr(propertyGroup, path_item) - - target_list = getattr(propertyGroup, "list") - index = getattr(propertyGroup, "list_index") - - propertyGroup.list_index = self.selection_index - return{'FINISHED'} - - -class GENERIC_LIST_OT_actions(Operator): - """Move items up and down, add and remove""" - bl_idname = "generic_list.list_action" - bl_label = "List Actions" - bl_description = "Move items up and down, add and remove" - bl_options = {'REGISTER', 'UNDO'} - - action: EnumProperty( - items=( - ('UP', "Up", ""), - ('DOWN', "Down", ""), - ('REMOVE', "Remove", ""), - ('ADD', "Add", ""))) - - property_group_path: StringProperty( - name="property group path", - description="", - ) - - component_name: StringProperty( - name="component name", - description="", - ) - - def invoke(self, context, event): - object = context.object - # information is stored in component meta - components_in_object = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == self.component_name, components_in_object), None) - - propertyGroup = component_meta - for path_item in json.loads(self.property_group_path): - propertyGroup = getattr(propertyGroup, path_item) - - target_list = getattr(propertyGroup, "list") - index = getattr(propertyGroup, "list_index") - - - if self.action == 'DOWN' and index < len(target_list) - 1: - #item_next = scn.rule_list[index + 1].name - target_list.move(index, index + 1) - propertyGroup.list_index += 1 - - elif self.action == 'UP' and index >= 1: - #item_prev = scn.rule_list[index - 1].name - target_list.move(index, index - 1) - propertyGroup.list_index -= 1 - - elif self.action == 'REMOVE': - target_list.remove(index) - propertyGroup.list_index = min(max(0, index - 1), len(target_list) - 1) - - if self.action == 'ADD': - item = target_list.add() - propertyGroup.list_index = index + 1 # we use this to force the change detection - #info = '"%s" added to list' % (item.name) - #self.report({'INFO'}, info) - - return {"FINISHED"} \ No newline at end of file diff --git a/tools/bevy_components/components/metadata.py b/tools/bevy_components/components/metadata.py deleted file mode 100644 index 3ba7deb..0000000 --- a/tools/bevy_components/components/metadata.py +++ /dev/null @@ -1,300 +0,0 @@ -import bpy -from bpy.props import (StringProperty, BoolProperty, PointerProperty) -from bpy_types import (PropertyGroup) -from ..propGroups.conversions_from_prop_group import property_group_value_to_custom_property_value -from ..propGroups.conversions_to_prop_group import property_group_value_from_custom_property_value - -class ComponentMetadata(bpy.types.PropertyGroup): - name : bpy.props.StringProperty( - name = "name", - default = "" - ) - - long_name : bpy.props.StringProperty( - name = "long name", - default = "" - ) - - type_name : bpy.props.StringProperty( - name = "Type", - default = "" - ) - - values: bpy.props.StringProperty( - name = "Value", - default = "" - ) - - enabled: BoolProperty( - name="enabled", - description="component enabled", - default=True - ) - - invalid: BoolProperty( - name="invalid", - description="component is invalid, because of missing registration/ other issues", - default=False - ) - - invalid_details: StringProperty( - name="invalid details", - description="detailed information about why the component is invalid", - default="" - ) - - visible: BoolProperty( # REALLY dislike doing this for UI control, but ok hack for now - default=True - ) - -class ComponentsMeta(PropertyGroup): - infos_per_component: StringProperty( - name="infos per component", - description="component" - ) - components: bpy.props.CollectionProperty(type = ComponentMetadata) - - @classmethod - def register(cls): - bpy.types.Object.components_meta = PointerProperty(type=ComponentsMeta) - - @classmethod - def unregister(cls): - del bpy.types.Object.components_meta - -# We need a collection property of components PER object -def get_component_metadata_by_short_name(object, short_name): - if not "components_meta" in object: - return None - return next(filter(lambda component: component["name"] == short_name, object.components_meta.components), None) - -# remove no longer valid metadata from object -def cleanup_invalid_metadata(object): - components_metadata = object.components_meta.components - to_remove = [] - for index, component_meta in enumerate(components_metadata): - short_name = component_meta.name - if short_name not in object.keys(): - print("component:", short_name, "present in metadata, but not in object") - to_remove.append(index) - for index in to_remove: - components_metadata.remove(index) - - -# returns a component definition ( an entry in registry's type_infos) with matching short name or None if nothing has been found -def find_component_definition_from_short_name(short_name): - registry = bpy.context.window_manager.components_registry - long_name = registry.short_names_to_long_names.get(short_name, None) - if long_name != None: - return registry.type_infos.get(long_name, None) - return None - -# FIXME: feels a bit heavy duty, should only be done -# if the components panel is active ? -def ensure_metadata_for_all_objects(): - for object in bpy.data.objects: - add_metadata_to_components_without_metadata(object) - -# returns whether an object has custom properties without matching metadata -def do_object_custom_properties_have_missing_metadata(object): - components_metadata = getattr(object, "components_meta", None) - if components_metadata == None: - return True - - components_metadata = components_metadata.components - - missing_metadata = False - for component_name in dict(object) : - if component_name == "components_meta": - continue - component_meta = next(filter(lambda component: component["name"] == component_name, components_metadata), None) - if component_meta == None: - # current component has no metadata but is there even a compatible type in the registry ? - # if not ignore it - component_definition = find_component_definition_from_short_name(component_name) - if component_definition != None: - missing_metadata = True - break - - return missing_metadata - - -# adds metadata to object only if it is missing -def add_metadata_to_components_without_metadata(object): - registry = bpy.context.window_manager.components_registry - - for component_name in dict(object) : - if component_name == "components_meta": - continue - upsert_component_in_object(object, component_name, registry) - -# adds a component to an object (including metadata) using the provided component definition & optional value -def add_component_to_object(object, component_definition, value=None): - cleanup_invalid_metadata(object) - if object is not None: - # print("add_component_to_object", component_definition) - long_name = component_definition["title"] - short_name = component_definition["short_name"] - registry = bpy.context.window_manager.components_registry - if not registry.has_type_infos(): - raise Exception('registry type infos have not been loaded yet or are missing !') - definition = registry.type_infos[long_name] - # now we use our pre_generated property groups to set the initial value of our custom property - (_, propertyGroup) = upsert_component_in_object(object, component_name=short_name, registry=registry) - if value == None: - value = property_group_value_to_custom_property_value(propertyGroup, definition, registry, None) - else: # we have provided a value, that is a raw , custom property value, to set the value of the propertyGroup - object["__disable__update"] = True # disable update callback while we set the values of the propertyGroup "tree" (as a propertyGroup can contain other propertyGroups) - property_group_value_from_custom_property_value(propertyGroup, definition, registry, value) - del object["__disable__update"] - - object[short_name] = value - -def upsert_component_in_object(object, component_name, registry): - # print("upsert_component_in_object", object, "component name", component_name) - # TODO: upsert this part too ? - target_components_metadata = object.components_meta.components - component_definition = find_component_definition_from_short_name(component_name) - if component_definition != None: - short_name = component_definition["short_name"] - long_name = component_definition["title"] - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - propertyGroup = None - - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - if not component_meta: - component_meta = target_components_metadata.add() - component_meta.name = short_name - component_meta.long_name = long_name - propertyGroup = getattr(component_meta, property_group_name, None) - else: # this one has metadata but we check that the relevant property group is present - propertyGroup = getattr(component_meta, property_group_name, None) - - # try to inject propertyGroup if not present - if propertyGroup == None: - #print("propertygroup not found in metadata attempting to inject") - if property_group_name in registry.component_propertyGroups: - # we have found a matching property_group, so try to inject it - # now inject property group - setattr(ComponentMetadata, property_group_name, registry.component_propertyGroups[property_group_name]) # FIXME: not ideal as all ComponentMetadata get the propGroup, but have not found a way to assign it per instance - propertyGroup = getattr(component_meta, property_group_name, None) - - # now deal with property groups details - if propertyGroup != None: - if short_name in registry.invalid_components: - component_meta.enabled = False - component_meta.invalid = True - component_meta.invalid_details = "component contains fields that are not in the schema, disabling" - else: - # if we still have not found the property group, mark it as invalid - component_meta.enabled = False - component_meta.invalid = True - component_meta.invalid_details = "component not present in the schema, possibly renamed? Disabling for now" - # property_group_value_from_custom_property_value(propertyGroup, component_definition, registry, object[component_name]) - - return (component_meta, propertyGroup) - else: - return(None, None) - - -def copy_propertyGroup_values_to_another_object(source_object, target_object, component_name, registry): - if source_object == None or target_object == None or component_name == None: - raise Exception('missing input data, cannot copy component propertryGroup') - - component_definition = find_component_definition_from_short_name(component_name) - short_name = component_definition["short_name"] - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - - registry = bpy.context.window_manager.components_registry - - source_components_metadata = source_object.components_meta.components - source_componentMeta = next(filter(lambda component: component["name"] == short_name, source_components_metadata), None) - # matching component means we already have this type of component - source_propertyGroup = getattr(source_componentMeta, property_group_name) - - # now deal with the target object - (_, target_propertyGroup) = upsert_component_in_object(target_object, component_name, registry) - # add to object - value = property_group_value_to_custom_property_value(target_propertyGroup, component_definition, registry, None) - target_object[short_name] = value - - # copy the values over - for field_name in source_propertyGroup.field_names: - if field_name in source_propertyGroup: - target_propertyGroup[field_name] = source_propertyGroup[field_name] - apply_propertyGroup_values_to_object_customProperties(target_object) - -# TODO: move to propgroups ? -def apply_propertyGroup_values_to_object_customProperties(object): - cleanup_invalid_metadata(object) - registry = bpy.context.window_manager.components_registry - for component_name in dict(object) : - if component_name == "components_meta": - continue - (_, propertyGroup) = upsert_component_in_object(object, component_name, registry) - component_definition = find_component_definition_from_short_name(component_name) - if component_definition != None: - value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None) - object[component_name] = value - -# apply component value(s) to custom property of a single component -def apply_propertyGroup_values_to_object_customProperties_for_component(object, component_name): - registry = bpy.context.window_manager.components_registry - print("yallah", component_name) - (_, propertyGroup) = upsert_component_in_object(object, component_name, registry) - component_definition = find_component_definition_from_short_name(component_name) - if component_definition != None: - print("merde") - value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None) - object[component_name] = value - - components_metadata = object.components_meta.components - componentMeta = next(filter(lambda component: component["name"] == component_name, components_metadata), None) - if componentMeta: - print("here") - componentMeta.invalid = False - componentMeta.invalid_details = "" - - -def apply_customProperty_values_to_object_propertyGroups(object): - print("apply custom properties to ", object.name) - registry = bpy.context.window_manager.components_registry - for component_name in dict(object) : - if component_name == "components_meta": - continue - component_definition = find_component_definition_from_short_name(component_name) - if component_definition != None: - property_group_name = registry.get_propertyGroupName_from_shortName(component_name) - components_metadata = object.components_meta.components - source_componentMeta = next(filter(lambda component: component["name"] == component_name, components_metadata), None) - # matching component means we already have this type of component - propertyGroup = getattr(source_componentMeta, property_group_name, None) - customProperty_value = object[component_name] - #value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None) - - object["__disable__update"] = True # disable update callback while we set the values of the propertyGroup "tree" (as a propertyGroup can contain other propertyGroups) - property_group_value_from_custom_property_value(propertyGroup, component_definition, registry, customProperty_value) - del object["__disable__update"] - source_componentMeta.invalid = False - source_componentMeta.invalid_details = "" - -# removes the given component from the object: removes both the custom property and the matching metadata from the object -def remove_component_from_object(object, component_name): - del object[component_name] - - components_metadata = getattr(object, "components_meta", None) - if components_metadata == None: - return False - - components_metadata = components_metadata.components - to_remove = [] - for index, component_meta in enumerate(components_metadata): - short_name = component_meta.name - if short_name == component_name: - to_remove.append(index) - break - for index in to_remove: - components_metadata.remove(index) - return True - - \ No newline at end of file diff --git a/tools/bevy_components/components/operators.py b/tools/bevy_components/components/operators.py deleted file mode 100644 index f640a98..0000000 --- a/tools/bevy_components/components/operators.py +++ /dev/null @@ -1,343 +0,0 @@ -import ast -import json -import bpy -from bpy_types import Operator -from bpy.props import (StringProperty) -from .metadata import add_component_to_object, add_metadata_to_components_without_metadata, apply_customProperty_values_to_object_propertyGroups, apply_propertyGroup_values_to_object_customProperties_for_component, copy_propertyGroup_values_to_another_object, find_component_definition_from_short_name, remove_component_from_object - -class AddComponentOperator(Operator): - """Add component to blueprint""" - bl_idname = "object.add_bevy_component" - bl_label = "Add component to blueprint Operator" - bl_options = {"UNDO"} - - component_type: StringProperty( - name="component_type", - description="component type to add", - ) # type: ignore - - def execute(self, context): - object = context.object - print("adding component ", self.component_type, "to object '"+object.name+"'") - - has_component_type = self.component_type != "" - if has_component_type and object != None: - type_infos = context.window_manager.components_registry.type_infos - component_definition = type_infos[self.component_type] - add_component_to_object(object, component_definition) - - return {'FINISHED'} - -class CopyComponentOperator(Operator): - """Copy component from blueprint""" - bl_idname = "object.copy_bevy_component" - bl_label = "Copy component Operator" - bl_options = {"UNDO"} - - source_component_name: StringProperty( - name="source component_name", - description="name of the component to copy", - ) # type: ignore - - source_object_name: StringProperty( - name="source object name", - description="name of the object to copy the component from", - ) # type: ignore - - @classmethod - def register(cls): - bpy.types.WindowManager.copied_source_component_name = StringProperty() - bpy.types.WindowManager.copied_source_object = StringProperty() - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.copied_source_component_name - del bpy.types.WindowManager.copied_source_object - - - def execute(self, context): - if self.source_component_name != '' and self.source_object_name != "": - context.window_manager.copied_source_component_name = self.source_component_name - context.window_manager.copied_source_object = self.source_object_name - else: - self.report({"ERROR"}, "The source object name / component name to copy a component from have not been specified") - - return {'FINISHED'} - - -class PasteComponentOperator(Operator): - """Paste component to blueprint""" - bl_idname = "object.paste_bevy_component" - bl_label = "Paste component to blueprint Operator" - bl_options = {"UNDO"} - - def execute(self, context): - source_object_name = context.window_manager.copied_source_object - source_object = bpy.data.objects.get(source_object_name, None) - print("source object", source_object) - if source_object == None: - self.report({"ERROR"}, "The source object to copy a component from does not exist") - else: - component_name = context.window_manager.copied_source_component_name - if not component_name in source_object: - self.report({"ERROR"}, "The source component to copy from does not exist") - else: - component_value = source_object[component_name] - print("pasting component to object: component name:", str(component_name), "component value:" + str(component_value)) - print (context.object) - registry = context.window_manager.components_registry - copy_propertyGroup_values_to_another_object(source_object, context.object, component_name, registry) - - return {'FINISHED'} - -class RemoveComponentOperator(Operator): - """Remove component from object""" - bl_idname = "object.remove_bevy_component" - bl_label = "Remove component from object Operator" - bl_options = {"UNDO"} - - component_name: StringProperty( - name="component name", - description="component to delete", - ) # type: ignore - - object_name: StringProperty( - name="object name", - description="object whose component to delete", - default="" - ) # type: ignore - - def execute(self, context): - if self.object_name == "": - object = context.object - else: - object = bpy.data.objects[self.object_name] - print("removing component ", self.component_name, "from object '"+object.name+"'") - if object is not None and self.component_name in object: - remove_component_from_object(object, self.component_name) - else: - self.report({"ERROR"}, "The object/ component to remove ("+ self.component_name +") does not exist") - - return {'FINISHED'} - - -class RemoveComponentFromAllObjectsOperator(Operator): - """Remove component from all object""" - bl_idname = "object.remove_bevy_component_all" - bl_label = "Remove component from all objects Operator" - bl_options = {"UNDO"} - - component_name: StringProperty( - name="component name", - description="component to delete", - ) # type: ignore - - @classmethod - def register(cls): - bpy.types.WindowManager.components_remove_progress = bpy.props.FloatProperty(default=-1.0) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.components_remove_progress - - def execute(self, context): - print("removing component ", self.component_name, "from all objects") - total = len(bpy.data.objects) - for index, object in enumerate(bpy.data.objects): - if len(object.keys()) > 0: - if object is not None and self.component_name in object: - remove_component_from_object(object, self.component_name) - - progress = index / total - context.window_manager.components_remove_progress = progress - # now force refresh the ui - bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) - context.window_manager.components_remove_progress = -1.0 - - return {'FINISHED'} - - -class RenameHelper(bpy.types.PropertyGroup): - original_name: bpy.props.StringProperty(name="") # type: ignore - new_name: bpy.props.StringProperty(name="") # type: ignore - - #object: bpy.props.PointerProperty(type=bpy.types.Object) - @classmethod - def register(cls): - bpy.types.WindowManager.bevy_component_rename_helper = bpy.props.PointerProperty(type=RenameHelper) - - @classmethod - def unregister(cls): - # remove handlers & co - del bpy.types.WindowManager.bevy_component_rename_helper - -class OT_rename_component(Operator): - """Rename component""" - bl_idname = "object.rename_bevy_component" - bl_label = "rename component" - bl_options = {"UNDO"} - - original_name: bpy.props.StringProperty(default="") # type: ignore - new_name: StringProperty( - name="new_name", - description="new name of component", - ) # type: ignore - - target_objects: bpy.props.StringProperty() # type: ignore - - @classmethod - def register(cls): - bpy.types.WindowManager.components_rename_progress = bpy.props.FloatProperty(default=-1.0) #bpy.props.PointerProperty(type=RenameHelper) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.components_rename_progress - - def execute(self, context): - registry = context.window_manager.components_registry - type_infos = registry.type_infos - settings = context.window_manager.bevy_component_rename_helper - original_name = settings.original_name if self.original_name == "" else self.original_name - new_name = self.new_name - - - print("renaming components: original name", original_name, "new_name", self.new_name, "targets", self.target_objects) - target_objects = json.loads(self.target_objects) - errors = [] - total = len(target_objects) - - if original_name != '' and new_name != '' and original_name != new_name and len(target_objects) > 0: - for index, object_name in enumerate(target_objects): - object = bpy.data.objects[object_name] - if object and original_name in object: - - # copy data to new component, remove the old one - try: - object[new_name] = object[original_name] - remove_component_from_object(object, original_name) - except Exception as error: - if '__disable__update' in object: - del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure - # get metadata - components_metadata = getattr(object, "components_meta", None) - if components_metadata: - components_metadata = components_metadata.components - component_meta = next(filter(lambda component: component["name"] == new_name, components_metadata), None) - if component_meta: - component_meta.invalid = True - component_meta.invalid_details = "unknow issue when renaming/transforming component, please remove it & add it back again" - - errors.append( "failed to copy old component value to new component: object: '" + object.name + "', error: " + str(error)) - - try: - # attempt conversion - long_name = registry.short_names_to_long_names[new_name] - component_definition = type_infos[long_name] - add_component_to_object(object, component_definition, object[new_name]) - except Exception as error: - if '__disable__update' in object: - del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure - components_metadata = getattr(object, "components_meta", None) - if components_metadata: - components_metadata = components_metadata.components - component_meta = next(filter(lambda component: component["name"] == new_name, components_metadata), None) - if component_meta: - component_meta.invalid = True - component_meta.invalid_details = "wrong custom property value, overwrite them by changing the values in the ui or change them & regenerate" - - errors.append( "wrong custom property values to generate target component: object: '" + object.name + "', error: " + str(error)) - - progress = index / total - context.window_manager.components_rename_progress = progress - - try: - # now force refresh the ui - bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) - except: pass # this is to allow this to run in cli/headless mode - - if len(errors) > 0: - self.report({'ERROR'}, "Failed to rename component: Errors:" + str(errors)) - else: - self.report({'INFO'}, "Sucessfully renamed component") - - #clear data after we are done - self.original_name = "" - context.window_manager.bevy_component_rename_helper.original_name = "" - context.window_manager.components_rename_progress = -1.0 - - - return {'FINISHED'} - - -class GenerateComponent_From_custom_property_Operator(Operator): - """generate components from custom property""" - bl_idname = "object.generate_bevy_component_from_custom_property" - bl_label = "Generate component from custom_property Operator" - bl_options = {"UNDO"} - - component_name: StringProperty( - name="component name", - description="component to generate custom properties for", - ) # type: ignore - - def execute(self, context): - object = context.object - - error = False - try: - add_metadata_to_components_without_metadata(object) - apply_customProperty_values_to_object_propertyGroups(object) - except Exception as error: - del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure - error = True - self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Error:" + str(error)) - if not error: - self.report({'INFO'}, "Sucessfully generated UI values for custom properties for selected object") - return {'FINISHED'} - - -class Fix_Component_Operator(Operator): - """attempt to fix component""" - bl_idname = "object.fix_bevy_component" - bl_label = "Fix component (attempts to)" - bl_options = {"UNDO"} - - component_name: StringProperty( - name="component name", - description="component to fix", - ) # type: ignore - - def execute(self, context): - object = context.object - error = False - try: - apply_propertyGroup_values_to_object_customProperties_for_component(object, self.component_name) - except Exception as error: - if "__disable__update" in object: - del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure - error = True - self.report({'ERROR'}, "Failed to fix component: Error:" + str(error)) - if not error: - self.report({'INFO'}, "Sucessfully fixed component (please double check component & its custom property value)") - return {'FINISHED'} - -class Toggle_ComponentVisibility(Operator): - """toggles components visibility""" - bl_idname = "object.toggle_bevy_component_visibility" - bl_label = "Toggle component visibility" - bl_options = {"UNDO"} - - component_name: StringProperty( - name="component name", - description="component to toggle", - ) # type: ignore - - def execute(self, context): - object = context.object - components_in_object = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == self.component_name, components_in_object), None) - if component_meta != None: - component_meta.visible = not component_meta.visible - - return {'FINISHED'} - diff --git a/tools/bevy_components/components/ui.py b/tools/bevy_components/components/ui.py deleted file mode 100644 index 4a356eb..0000000 --- a/tools/bevy_components/components/ui.py +++ /dev/null @@ -1,224 +0,0 @@ -import json -import bpy - -from ..registry.operators import COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_CURRENT -from .metadata import do_object_custom_properties_have_missing_metadata -from .operators import AddComponentOperator, CopyComponentOperator, Fix_Component_Operator, RemoveComponentOperator, GenerateComponent_From_custom_property_Operator, PasteComponentOperator, Toggle_ComponentVisibility - -def draw_propertyGroup( propertyGroup, layout, nesting =[], rootName=None): - is_enum = getattr(propertyGroup, "with_enum") - is_list = getattr(propertyGroup, "with_list") - #nesting = nesting + [current_short_name] # we need this convoluted "nested path strings " workaround so that operators working on a given - # item in our components hierarchy can get the correct propertyGroup by STRINGS because of course, we cannot pass objects to operators...sigh - - # if it is an enum, the first field name is always the list of enum variants, the others are the variants - field_names = propertyGroup.field_names - #print("") - #print("drawing", propertyGroup, nesting, "component_name", rootName) - #type_name = getattr(propertyGroup, "type_name", None)#propertyGroup.type_name if "type_name" in propertyGroup else "" - #print("type name", type_name) - #print("name", propertyGroup.name, "name2", getattr(propertyGroup, "name"), "short_name", getattr(propertyGroup, "short_name", None), "nesting", nesting) - if is_enum: - subrow = layout.row() - display_name = field_names[0] if propertyGroup.tupple_or_struct == "struct" else "" - subrow.prop(propertyGroup, field_names[0], text=display_name) - subrow.separator() - selection = getattr(propertyGroup, field_names[0]) - - for fname in field_names[1:]: - if fname == "variant_" + selection: - subrow = layout.row() - display_name = fname if propertyGroup.tupple_or_struct == "struct" else "" - - nestedPropertyGroup = getattr(propertyGroup, fname) - nested = getattr(nestedPropertyGroup, "nested", False) - #print("nestedPropertyGroup", nestedPropertyGroup, fname, nested) - if nested: - draw_propertyGroup(nestedPropertyGroup, subrow.column(), nesting + [fname], rootName ) - # if an enum variant is not a propertyGroup - break - elif is_list: - #print("show list", propertyGroup, dict(propertyGroup), propertyGroup.type_name) - item_list = getattr(propertyGroup, "list") - item_type = getattr(propertyGroup, "type_name_short") - list_index = getattr(propertyGroup, "list_index") - box = layout.box() - split = box.split(factor=0.9) - list_column, buttons_column = (split.column(),split.column()) - - list_column = list_column.box() - for index, item in enumerate(item_list): - row = list_column.row() - draw_propertyGroup(item, row, nesting, rootName) - icon = 'CHECKBOX_HLT' if list_index == index else 'CHECKBOX_DEHLT' - op = row.operator('generic_list.select_item', icon=icon, text="") - op.component_name = rootName - op.property_group_path = json.dumps(nesting) - op.selection_index = index - - #various control buttons - buttons_column.separator() - row = buttons_column.row() - op = row.operator('generic_list.list_action', icon='ADD', text="") - op.action = 'ADD' - op.component_name = rootName - op.property_group_path = json.dumps(nesting) - - row = buttons_column.row() - op = row.operator('generic_list.list_action', icon='REMOVE', text="") - op.action = 'REMOVE' - op.component_name = rootName - op.property_group_path = json.dumps(nesting) - - buttons_column.separator() - row = buttons_column.row() - op = row.operator('generic_list.list_action', icon='TRIA_UP', text="") - op.action = 'UP' - op.component_name = rootName - op.property_group_path = json.dumps(nesting) - - row = buttons_column.row() - op = row.operator('generic_list.list_action', icon='TRIA_DOWN', text="") - op.action = 'DOWN' - op.component_name = rootName - op.property_group_path = json.dumps(nesting) - - else: - for fname in field_names: - subrow = layout.row() - nestedPropertyGroup = getattr(propertyGroup, fname) - nested = getattr(nestedPropertyGroup, "nested", False) - display_name = fname if propertyGroup.tupple_or_struct == "struct" else "" - - if nested: - layout.separator() - layout.label(text=display_name) # this is the name of the field/sub field - layout.separator() - draw_propertyGroup(nestedPropertyGroup, subrow.column(), nesting + [fname], rootName ) - else: - subrow.prop(propertyGroup, fname, text=display_name) - subrow.separator() - - -class BEVY_COMPONENTS_PT_ComponentsPanel(bpy.types.Panel): - bl_idname = "BEVY_COMPONENTS_PT_ComponentsPanel" - bl_label = "Components" - bl_space_type = 'VIEW_3D' - bl_region_type = 'UI' - bl_category = "Bevy Components" - bl_context = "objectmode" - bl_parent_id = "BEVY_COMPONENTS_PT_MainPanel" - - @classmethod - def poll(cls, context): - return (context.object is not None) - - def draw(self, context): - object = context.object - layout = self.layout - - # we get & load our component registry - registry = bpy.context.window_manager.components_registry - available_components = bpy.context.window_manager.components_list - registry_has_type_infos = registry.has_type_infos() - - if object is not None: - row = layout.row(align=True) - row.prop(available_components, "list", text="Component") - row.prop(available_components, "filter",text="Filter") - - # add components - row = layout.row(align=True) - op = row.operator(AddComponentOperator.bl_idname, text="Add", icon="ADD") - op.component_type = available_components.list - row.enabled = available_components.list != '' - - layout.separator() - - # paste components - row = layout.row(align=True) - row.operator(PasteComponentOperator.bl_idname, text="Paste component ("+bpy.context.window_manager.copied_source_component_name+")", icon="PASTEDOWN") - row.enabled = registry_has_type_infos and context.window_manager.copied_source_object != '' - - layout.separator() - - # upgrate custom props to components - upgradeable_customProperties = registry.has_type_infos() and do_object_custom_properties_have_missing_metadata(context.object) - if upgradeable_customProperties: - row = layout.row(align=True) - op = row.operator(GenerateComponent_From_custom_property_Operator.bl_idname, text="generate components from custom properties" , icon="LOOP_FORWARDS") - layout.separator() - - - components_in_object = object.components_meta.components - for component_name in sorted(dict(object)) : # sorted by component name, practical - if component_name == "components_meta": - continue - # anything withouth metadata gets skipped, we only want to see real components, not all custom props - component_meta = next(filter(lambda component: component["name"] == component_name, components_in_object), None) - if component_meta == None: - continue - - component_invalid = getattr(component_meta, "invalid") - invalid_details = getattr(component_meta, "invalid_details") - component_visible = getattr(component_meta, "visible") - single_field = False - - # our whole row - box = layout.box() - row = box.row(align=True) - # "header" - row.alert = component_invalid - row.prop(component_meta, "enabled", text="") - row.label(text=component_name) - - # we fetch the matching ui property group - root_propertyGroup_name = registry.get_propertyGroupName_from_shortName(component_name) - if root_propertyGroup_name: - propertyGroup = getattr(component_meta, root_propertyGroup_name, None) - if propertyGroup: - # if the component has only 0 or 1 field names, display inline, otherwise change layout - single_field = len(propertyGroup.field_names) < 2 - prop_group_location = box.row(align=True).column() - if single_field: - prop_group_location = row.column(align=True)#.split(factor=0.9)#layout.row(align=False) - - if component_visible: - if component_invalid: - error_message = invalid_details if component_invalid else "Missing component UI data, please reload registry !" - prop_group_location.label(text=error_message) - draw_propertyGroup(propertyGroup, prop_group_location, [root_propertyGroup_name], component_name) - else : - row.label(text="details hidden, click on toggle to display") - else: - error_message = invalid_details if component_invalid else "Missing component UI data, please reload registry !" - row.label(text=error_message) - - # "footer" with additional controls - if component_invalid: - if root_propertyGroup_name: - propertyGroup = getattr(component_meta, root_propertyGroup_name, None) - if propertyGroup: - unit_struct = len(propertyGroup.field_names) == 0 - if unit_struct: - op = row.operator(Fix_Component_Operator.bl_idname, text="", icon="SHADERFX") - op.component_name = component_name - row.separator() - - op = row.operator(RemoveComponentOperator.bl_idname, text="", icon="X") - op.component_name = component_name - row.separator() - - op = row.operator(CopyComponentOperator.bl_idname, text="", icon="COPYDOWN") - op.source_component_name = component_name - op.source_object_name = object.name - row.separator() - - #if not single_field: - toggle_icon = "TRIA_DOWN" if component_visible else "TRIA_RIGHT" - op = row.operator(Toggle_ComponentVisibility.bl_idname, text="", icon=toggle_icon) - op.component_name = component_name - #row.separator() - - else: - layout.label(text ="Select an object to edit its components") diff --git a/tools/bevy_components/helpers.py b/tools/bevy_components/helpers.py deleted file mode 100644 index 0c56e39..0000000 --- a/tools/bevy_components/helpers.py +++ /dev/null @@ -1,30 +0,0 @@ -import bpy -import json - -# Makes an empty, at the specified location, rotation, scale stores it in existing collection, from https://blender.stackexchange.com/questions/51290/how-to-add-empty-object-not-using-bpy-ops -def make_empty(name, location, rotation, scale, collection): - object_data = None - empty_obj = bpy.data.objects.new( name, object_data ) - - empty_obj.empty_display_size = 2 - empty_obj.empty_display_type = 'PLAIN_AXES' - - empty_obj.name = name - empty_obj.location = location - empty_obj.scale = scale - empty_obj.rotation_euler = rotation - - collection.objects.link( empty_obj ) - #bpy.context.view_layer.update() - return empty_obj - -def upsert_settings(name, data): - stored_settings = bpy.data.texts[name] if name in bpy.data.texts else bpy.data.texts.new(name) - stored_settings.clear() - stored_settings.write(json.dumps(data)) - -def load_settings(name): - stored_settings = bpy.data.texts[name] if name in bpy.data.texts else None - if stored_settings != None: - return json.loads(stored_settings.as_string()) - return None diff --git a/tools/bevy_components/propGroups/process_enum.py b/tools/bevy_components/propGroups/process_enum.py deleted file mode 100644 index e7a1e24..0000000 --- a/tools/bevy_components/propGroups/process_enum.py +++ /dev/null @@ -1,69 +0,0 @@ -from bpy.props import (StringProperty) -from . import process_component - -def process_enum(registry, definition, update, nesting): - blender_property_mapping = registry.blender_property_mapping - short_name = definition["short_name"] - type_def = definition["type"] if "type" in definition else None - values = definition["oneOf"] - - nesting = nesting + [short_name] - __annotations__ = {} - original_type_name = "enum" - - #print("processing enum", short_name, definition) - - if type_def == "object": - labels = [] - additional_annotations = {} - for item in values: - item_name = item["title"] - item_short_name = item["short_name"] if "short_name" in item else item_name - variant_name = "variant_"+item_short_name - labels.append(item_name) - - if "prefixItems" in item: - #print("tupple variant in enum", short_name, item) - registry.add_custom_type(item_short_name, item) - (sub_component_group, _) = process_component.process_component(registry, item, update, {"nested": True}, nesting) - additional_annotations[variant_name] = sub_component_group - elif "properties" in item: - #print("struct variant in enum", short_name, item) - registry.add_custom_type(item_short_name, item) - (sub_component_group, _) = process_component.process_component(registry, item, update, {"nested": True}, nesting) - additional_annotations[variant_name] = sub_component_group - else: # for the cases where it's neither a tupple nor a structs: FIXME: not 100% sure of this - #print("other variant in enum", short_name) - annotations = {"variant_"+item_name: StringProperty(default="--------")} - additional_annotations = additional_annotations | annotations - - items = tuple((e, e, e) for e in labels) - property_name = short_name - - blender_property_def = blender_property_mapping[original_type_name] - blender_property = blender_property_def["type"]( - **blender_property_def["presets"],# we inject presets first - name = property_name, - items=items, - update= update -) - __annotations__[property_name] = blender_property - - for a in additional_annotations: - __annotations__[a] = additional_annotations[a] - # enum_value => what field to display - # a second field + property for the "content" of the enum - else: - items = tuple((e, e, "") for e in values) - property_name = short_name - - blender_property_def = blender_property_mapping[original_type_name] - blender_property = blender_property_def["type"]( - **blender_property_def["presets"],# we inject presets first - name = property_name, - items=items, - update= update - ) - __annotations__[property_name] = blender_property - - return __annotations__ diff --git a/tools/bevy_components/propGroups/prop_groups.py b/tools/bevy_components/propGroups/prop_groups.py deleted file mode 100644 index 8ac1a1b..0000000 --- a/tools/bevy_components/propGroups/prop_groups.py +++ /dev/null @@ -1,40 +0,0 @@ -import bpy -from .conversions_from_prop_group import property_group_value_to_custom_property_value -from .process_component import process_component -from .utils import update_calback_helper - -## main callback function, fired whenever any property changes, no matter the nesting level -def update_component(self, context, definition, component_name): - registry = bpy.context.window_manager.components_registry - current_object = bpy.context.object - update_disabled = current_object["__disable__update"] if "__disable__update" in current_object else False - update_disabled = registry.disable_all_object_updates or update_disabled # global settings - if update_disabled: - return - print("") - print("update in component", component_name, self, "current_object", current_object.name) - components_in_object = current_object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == component_name, components_in_object), None) - if component_meta != None: - property_group_name = registry.get_propertyGroupName_from_shortName(component_name) - self = getattr(component_meta, property_group_name) - # we use our helper to set the values - context.object[component_name] = property_group_value_to_custom_property_value(self, definition, registry, None) - - -def generate_propertyGroups_for_components(): - registry = bpy.context.window_manager.components_registry - if not registry.has_type_infos(): - registry.load_type_infos() - - type_infos = registry.type_infos - - for component_name in type_infos: - definition = type_infos[component_name] - short_name = definition["short_name"] - is_component = definition['isComponent'] if "isComponent" in definition else False - root_property_name = short_name if is_component else None - process_component(registry, definition, update_calback_helper(definition, update_component, root_property_name), None, []) - - # if we had to add any wrapper types on the fly, process them now - registry.process_custom_types() \ No newline at end of file diff --git a/tools/bevy_components/pytest.ini b/tools/bevy_components/pytest.ini deleted file mode 100644 index 7f369af..0000000 --- a/tools/bevy_components/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -testpaths = - tests \ No newline at end of file diff --git a/tools/bevy_components/registry/operators.py b/tools/bevy_components/registry/operators.py deleted file mode 100644 index 8d84413..0000000 --- a/tools/bevy_components/registry/operators.py +++ /dev/null @@ -1,236 +0,0 @@ -import os -import bpy -from bpy_types import (Operator) -from bpy.props import (StringProperty) -from bpy_extras.io_utils import ImportHelper - -from ..helpers import upsert_settings -from ..components.metadata import apply_customProperty_values_to_object_propertyGroups, apply_propertyGroup_values_to_object_customProperties, ensure_metadata_for_all_objects -from ..propGroups.prop_groups import generate_propertyGroups_for_components - -class ReloadRegistryOperator(Operator): - """Reloads registry (schema file) from disk, generates propertyGroups for components & ensures all objects have metadata """ - bl_idname = "object.reload_registry" - bl_label = "Reload Registry" - bl_options = {"UNDO"} - - component_type: StringProperty( - name="component_type", - description="component type to add", - ) # type: ignore - - def execute(self, context): - print("reload registry") - context.window_manager.components_registry.load_schema() - generate_propertyGroups_for_components() - print("") - print("") - print("") - ensure_metadata_for_all_objects() - - # now force refresh the ui - for area in context.screen.areas: - for region in area.regions: - if region.type == "UI": - region.tag_redraw() - - return {'FINISHED'} - -class COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_ALL(Operator): - """Apply registry to ALL objects: update the custom property values of all objects based on their definition, if any""" - bl_idname = "object.refresh_custom_properties_all" - bl_label = "Apply Registry to all objects" - bl_options = {"UNDO"} - - @classmethod - def register(cls): - bpy.types.WindowManager.custom_properties_from_components_progress_all = bpy.props.FloatProperty(default=-1.0) #bpy.props.PointerProperty(type=RenameHelper) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.custom_properties_from_components_progress_all - - def execute(self, context): - print("apply registry to all") - #context.window_manager.components_registry.load_schema() - total = len(bpy.data.objects) - - for index, object in enumerate(bpy.data.objects): - apply_propertyGroup_values_to_object_customProperties(object) - progress = index / total - context.window_manager.custom_properties_from_components_progress_all = progress - # now force refresh the ui - bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) - context.window_manager.custom_properties_from_components_progress_all = -1.0 - - return {'FINISHED'} - -class COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_CURRENT(Operator): - """Apply registry to CURRENT object: update the custom property values of current object based on their definition, if any""" - bl_idname = "object.refresh_custom_properties_current" - bl_label = "Apply Registry to current object" - bl_options = {"UNDO"} - - @classmethod - def register(cls): - bpy.types.WindowManager.custom_properties_from_components_progress = bpy.props.FloatProperty(default=-1.0) #bpy.props.PointerProperty(type=RenameHelper) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.custom_properties_from_components_progress - - def execute(self, context): - print("apply registry to current object") - object = context.object - context.window_manager.custom_properties_from_components_progress = 0.5 - # now force refresh the ui - bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) - apply_propertyGroup_values_to_object_customProperties(object) - - context.window_manager.custom_properties_from_components_progress = -1.0 - return {'FINISHED'} - - -class COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_CURRENT(Operator): - """Update UI values from custom properties to CURRENT object""" - bl_idname = "object.refresh_ui_from_custom_properties_current" - bl_label = "Apply custom_properties to current object" - bl_options = {"UNDO"} - - @classmethod - def register(cls): - bpy.types.WindowManager.components_from_custom_properties_progress = bpy.props.FloatProperty(default=-1.0) #bpy.props.PointerProperty(type=RenameHelper) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.components_from_custom_properties_progress - - def execute(self, context): - print("apply custom properties to current object") - object = context.object - error = False - try: - apply_customProperty_values_to_object_propertyGroups(object) - progress = 0.5 - context.window_manager.components_from_custom_properties_progress = progress - try: - # now force refresh the ui - bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) - except:pass # ony run in ui - - except Exception as error: - del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure - error = True - self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Error:" + str(error)) - if not error: - self.report({'INFO'}, "Sucessfully generated UI values for custom properties for selected object") - context.window_manager.components_from_custom_properties_progress = -1.0 - - return {'FINISHED'} - - -class COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_ALL(Operator): - """Update UI values from custom properties to ALL object""" - bl_idname = "object.refresh_ui_from_custom_properties_all" - bl_label = "Apply custom_properties to all objects" - bl_options = {"UNDO"} - - @classmethod - def register(cls): - bpy.types.WindowManager.components_from_custom_properties_progress_all = bpy.props.FloatProperty(default=-1.0) #bpy.props.PointerProperty(type=RenameHelper) - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.components_from_custom_properties_progress_all - - def execute(self, context): - print("apply custom properties to all object") - bpy.context.window_manager.components_registry.disable_all_object_updates = True - errors = [] - total = len(bpy.data.objects) - - for index, object in enumerate(bpy.data.objects): - - try: - apply_customProperty_values_to_object_propertyGroups(object) - except Exception as error: - del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure - errors.append( "object: '" + object.name + "', error: " + str(error)) - - progress = index / total - context.window_manager.components_from_custom_properties_progress_all = progress - # now force refresh the ui - bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) - - - - if len(errors) > 0: - self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Errors:" + str(errors)) - else: - self.report({'INFO'}, "Sucessfully generated UI values for custom properties for all objects") - bpy.context.window_manager.components_registry.disable_all_object_updates = False - context.window_manager.components_from_custom_properties_progress_all = -1.0 - return {'FINISHED'} - -class OT_OpenFilebrowser(Operator, ImportHelper): - """Browse for registry json file""" - bl_idname = "generic.open_filebrowser" - bl_label = "Open the file browser" - - filter_glob: StringProperty( - default='*.json', - options={'HIDDEN'} - ) # type: ignore - def execute(self, context): - """Do something with the selected file(s).""" - #filename, extension = os.path.splitext(self.filepath) - file_path = bpy.data.filepath - # Get the folder - folder_path = os.path.dirname(file_path) - relative_path = os.path.relpath(self.filepath, folder_path) - - registry = context.window_manager.components_registry - registry.schemaPath = relative_path - - upsert_settings(registry.settings_save_path, {"schemaPath": relative_path}) - - return {'FINISHED'} - - -class OT_select_object(Operator): - """Select object by name""" - bl_idname = "object.select" - bl_label = "Select object" - bl_options = {"UNDO"} - - object_name: StringProperty( - name="object_name", - description="object to select's name ", - ) # type: ignore - - def execute(self, context): - if self.object_name: - object = bpy.data.objects[self.object_name] - scenes_of_object = list(object.users_scene) - if len(scenes_of_object) > 0: - bpy.ops.object.select_all(action='DESELECT') - bpy.context.window.scene = scenes_of_object[0] - object.select_set(True) - bpy.context.view_layer.objects.active = object - return {'FINISHED'} - -class OT_select_component_name_to_replace(Operator): - """Select component name to replace""" - bl_idname = "object.select_component_name_to_replace" - bl_label = "Select component name for bulk replace" - bl_options = {"UNDO"} - - component_name: StringProperty( - name="component_name", - description="component name to replace", - ) # type: ignore - - def execute(self, context): - context.window_manager.bevy_component_rename_helper.original_name = self.component_name - return {'FINISHED'} - \ No newline at end of file diff --git a/tools/bevy_components/registry/ui.py b/tools/bevy_components/registry/ui.py deleted file mode 100644 index 9df1ab0..0000000 --- a/tools/bevy_components/registry/ui.py +++ /dev/null @@ -1,327 +0,0 @@ -import json -import bpy -from bpy_types import (UIList) -from bpy.props import (StringProperty) - -from ..components.operators import OT_rename_component, RemoveComponentFromAllObjectsOperator, RemoveComponentOperator -from .operators import( - COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_ALL, - COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_CURRENT, - OT_OpenFilebrowser, - OT_select_component_name_to_replace, - OT_select_object, ReloadRegistryOperator, - COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_ALL, - COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_CURRENT) - -class BEVY_COMPONENTS_PT_Configuration(bpy.types.Panel): - bl_idname = "BEVY_COMPONENTS_PT_Configuration" - bl_label = "Configuration" - bl_space_type = 'VIEW_3D' - bl_region_type = 'UI' - bl_category = "Bevy Components" - bl_context = "objectmode" - bl_parent_id = "BEVY_COMPONENTS_PT_MainPanel" - bl_options = {'DEFAULT_CLOSED'} - bl_description = "list of missing/unregistered type from the bevy side" - - def draw(self, context): - layout = self.layout - registry = context.window_manager.components_registry - - - row = layout.row() - col = row.column() - col.enabled = False - col.prop(registry, "schemaPath", text="Registry Schema path") - col = row.column() - col.operator(OT_OpenFilebrowser.bl_idname, text="Browse for registry schema file (json)") - - layout.separator() - layout.operator(ReloadRegistryOperator.bl_idname, text="reload registry" , icon="FILE_REFRESH") - - layout.separator() - row = layout.row() - - row.prop(registry, "watcher_enabled", text="enable registry file polling") - row.prop(registry, "watcher_poll_frequency", text="registry file poll frequency (s)") - - layout.separator() - layout.separator() - - -class BEVY_COMPONENTS_PT_AdvancedToolsPanel(bpy.types.Panel): - """panel listing all the missing bevy types in the schema""" - bl_idname = "BEVY_COMPONENTS_PT_AdvancedToolsPanel" - bl_label = "Advanced tools" - bl_space_type = 'VIEW_3D' - bl_region_type = 'UI' - bl_category = "Bevy Components" - bl_context = "objectmode" - bl_parent_id = "BEVY_COMPONENTS_PT_MainPanel" - bl_options = {'DEFAULT_CLOSED'} - bl_description = "advanced tooling" - - - def draw_invalid_or_unregistered_header(self, layout, items): - row = layout.row() - - for item in items: - col = row.column() - col.label(text=item) - - - def draw_invalid_or_unregistered(self, layout, status, component_name, object): - available_components = bpy.context.window_manager.components_list - registry = bpy.context.window_manager.components_registry - registry_has_type_infos = registry.has_type_infos() - - row = layout.row() - - col = row.column() - col.label(text=component_name) - - col = row.column() - operator = col.operator(OT_select_object.bl_idname, text=object.name) - operator.object_name = object.name - - col = row.column() - col.label(text=status) - - col = row.column() - col.prop(available_components, "list", text="") - - col = row.column() - operator = col.operator(OT_rename_component.bl_idname, text="", icon="SHADERFX") #rename - new_name = registry.type_infos[available_components.list]['short_name'] if available_components.list in registry.type_infos else "" - operator.original_name = component_name - operator.target_objects = json.dumps([object.name]) - operator.new_name = new_name - col.enabled = registry_has_type_infos and component_name != "" and component_name != new_name - - - col = row.column() - operator = col.operator(RemoveComponentOperator.bl_idname, text="", icon="X") - operator.object_name = object.name - operator.component_name = component_name - - col = row.column() - col = row.column() - operator = col.operator(OT_select_component_name_to_replace.bl_idname, text="", icon="EYEDROPPER") #text="select for rename", - operator.component_name = component_name - - def draw(self, context): - layout = self.layout - registry = bpy.context.window_manager.components_registry - registry_has_type_infos = registry.has_type_infos() - selected_object = context.selected_objects[0] if len(context.selected_objects) > 0 else None - available_components = bpy.context.window_manager.components_list - - row = layout.row() - box= row.box() - box.label(text="Invalid/ unregistered components") - - objects_with_invalid_components = [] - invalid_component_names = [] - - self.draw_invalid_or_unregistered_header(layout, ["Component", "Object", "Status", "Target"]) - - for object in bpy.data.objects: # TODO: very inneficent - if len(object.keys()) > 0: - if "components_meta" in object: - components_metadata = object.components_meta.components - comp_names = [] - for index, component_meta in enumerate(components_metadata): - short_name = component_meta.name - if component_meta.invalid: - self.draw_invalid_or_unregistered(layout, "Invalid", short_name, object) - - if not object.name in objects_with_invalid_components: - objects_with_invalid_components.append(object.name) - - if not short_name in invalid_component_names: - invalid_component_names.append(short_name) - - - comp_names.append(short_name) - - for custom_property in object.keys(): - if custom_property != 'components_meta' and custom_property not in comp_names: - self.draw_invalid_or_unregistered(layout, "Unregistered", custom_property, object) - - if not object.name in objects_with_invalid_components: - objects_with_invalid_components.append(object.name) - if not short_name in invalid_component_names: - invalid_component_names.append(custom_property) - layout.separator() - layout.separator() - original_name = bpy.context.window_manager.bevy_component_rename_helper.original_name - - row = layout.row() - col = row.column() - col.label(text="Original") - col = row.column() - col.label(text="New") - col = row.column() - col.label(text="------") - - row = layout.row() - col = row.column() - box = col.box() - box.label(text=original_name) - - col = row.column() - col.prop(available_components, "list", text="") - #row.prop(available_components, "filter",text="Filter") - - col = row.column() - components_rename_progress = context.window_manager.components_rename_progress - - if components_rename_progress == -1.0: - operator = col.operator(OT_rename_component.bl_idname, text="apply", icon="SHADERFX") - operator.target_objects = json.dumps(objects_with_invalid_components) - new_name = registry.type_infos[available_components.list]['short_name'] if available_components.list in registry.type_infos else "" - operator.new_name = new_name - col.enabled = registry_has_type_infos and original_name != "" and original_name != new_name - else: - if hasattr(layout,"progress") : # only for Blender > 4.0 - col.progress(factor = components_rename_progress, text=f"updating {components_rename_progress * 100.0:.2f}%") - - col = row.column() - remove_components_progress = context.window_manager.components_remove_progress - if remove_components_progress == -1.0: - operator = row.operator(RemoveComponentFromAllObjectsOperator.bl_idname, text="", icon="X") - operator.component_name = context.window_manager.bevy_component_rename_helper.original_name - col.enabled = registry_has_type_infos and original_name != "" - else: - if hasattr(layout,"progress") : # only for Blender > 4.0 - col.progress(factor = remove_components_progress, text=f"updating {remove_components_progress * 100.0:.2f}%") - - layout.separator() - layout.separator() - row = layout.row() - box= row.box() - box.label(text="Conversions between custom properties and components & vice-versa") - - row = layout.row() - row.label(text="WARNING ! The following operations will overwrite your existing custom properties if they have matching types on the bevy side !") - row.alert = True - - ## - row = layout.row() - custom_properties_from_components_progress_current = context.window_manager.custom_properties_from_components_progress - - if custom_properties_from_components_progress_current == -1.0: - row.operator(COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_CURRENT.bl_idname, text="update custom properties of current object" , icon="LOOP_FORWARDS") - row.enabled = registry_has_type_infos and selected_object is not None - else: - if hasattr(layout,"progress") : # only for Blender > 4.0 - layout.progress(factor = custom_properties_from_components_progress_current, text=f"updating {custom_properties_from_components_progress_current * 100.0:.2f}%") - - layout.separator() - row = layout.row() - custom_properties_from_components_progress_all = context.window_manager.custom_properties_from_components_progress_all - - if custom_properties_from_components_progress_all == -1.0: - row.operator(COMPONENTS_OT_REFRESH_CUSTOM_PROPERTIES_ALL.bl_idname, text="update custom properties of ALL objects" , icon="LOOP_FORWARDS") - row.enabled = registry_has_type_infos - else: - if hasattr(layout,"progress") : # only for Blender > 4.0 - layout.progress(factor = custom_properties_from_components_progress_all, text=f"updating {custom_properties_from_components_progress_all * 100.0:.2f}%") - - ######################## - - row = layout.row() - row.label(text="WARNING ! The following operations will try to overwrite your existing ui values if they have matching types on the bevy side !") - row.alert = True - - components_from_custom_properties_progress_current = context.window_manager.components_from_custom_properties_progress - - row = layout.row() - if components_from_custom_properties_progress_current == -1.0: - row.operator(COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_CURRENT.bl_idname, text="update UI FROM custom properties of current object" , icon="LOOP_BACK") - row.enabled = registry_has_type_infos and selected_object is not None - else: - if hasattr(layout,"progress") : # only for Blender > 4.0 - layout.progress(factor = components_from_custom_properties_progress_current, text=f"updating {components_from_custom_properties_progress_current * 100.0:.2f}%") - - layout.separator() - row = layout.row() - components_from_custom_properties_progress_all = context.window_manager.components_from_custom_properties_progress_all - - if components_from_custom_properties_progress_all == -1.0: - row.operator(COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_ALL.bl_idname, text="update UI FROM custom properties of ALL objects" , icon="LOOP_BACK") - row.enabled = registry_has_type_infos - else: - if hasattr(layout,"progress") : # only for Blender > 4.0 - layout.progress(factor = components_from_custom_properties_progress_all, text=f"updating {components_from_custom_properties_progress_all * 100.0:.2f}%") - - -class BEVY_COMPONENTS_PT_MissingTypesPanel(bpy.types.Panel): - """panel listing all the missing bevy types in the schema""" - bl_idname = "BEVY_COMPONENTS_PT_MissingTypesPanel" - bl_label = "Bevy Missing/Unregistered Types" - bl_space_type = 'VIEW_3D' - bl_region_type = 'UI' - bl_category = "Bevy Components" - bl_context = "objectmode" - bl_parent_id = "BEVY_COMPONENTS_PT_MainPanel" - bl_options = {'DEFAULT_CLOSED'} - bl_description = "list of missing/unregistered type from the bevy side" - - def draw(self, context): - layout = self.layout - registry = bpy.context.window_manager.components_registry - - layout.label(text="Missing types ") - layout.template_list("MISSING_TYPES_UL_List", "Missing types list", registry, "missing_types_list", registry, "missing_types_list_index") - - -class MISSING_TYPES_UL_List(UIList): - """Missing components UIList.""" - - use_filter_name_reverse: bpy.props.BoolProperty( - name="Reverse Name", - default=False, - options=set(), - description="Reverse name filtering", - ) - - use_order_name = bpy.props.BoolProperty(name="Name", default=False, options=set(), - description="Sort groups by their name (case-insensitive)") - - def filter_items__(self, context, data, propname): - """Filter and order items in the list.""" - # We initialize filtered and ordered as empty lists. Notice that # if all sorting and filtering is disabled, we will return # these empty. - filtered = [] - ordered = [] - items = getattr(data, propname) - - helper_funcs = bpy.types.UI_UL_list - - - print("filter, order", items, self, dict(self)) - if self.filter_name: - print("ssdfs", self.filter_name) - filtered= helper_funcs.filter_items_by_name(self.filter_name, self.bitflag_filter_item, items, "type_name", reverse=self.use_filter_name_reverse) - - if not filtered: - filtered = [self.bitflag_filter_item] * len(items) - - if self.use_order_name: - ordered = helper_funcs.sort_items_by_name(items, "name") - - - return filtered, ordered - - - def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): - if self.layout_type in {'DEFAULT', 'COMPACT'}: - row = layout.row() - #row.enabled = False - #row.alert = True - row.prop(item, "type_name", text="") - - elif self.layout_type in {'GRID'}: - layout.alignment = 'CENTER' - row = layout.row() - row.prop(item, "type_name", text="") diff --git a/tools/bevy_components/tests/expected_component_values.py b/tools/bevy_components/tests/expected_component_values.py deleted file mode 100644 index f7969ac..0000000 --- a/tools/bevy_components/tests/expected_component_values.py +++ /dev/null @@ -1,444 +0,0 @@ - - -expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()', - 'Aabb': '(center: Vec3A(x:0.0, y:0.0, z:0.0), half_extents: Vec3A(x:0.0, y:0.0, z:0.0))', - 'AdditionalMassProperties': 'Mass(0.0)', - 'AnimationPlayer': '(animation: "", paused: true)', - 'Animations': '(named_animations: "")', - 'AutoAABBCollider': 'Cuboid', - 'BackgroundColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', - 'BasicTest': '(a: 0.0, b: 0, c: " ")', - 'BlenderBackgroundShader': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), strength: 0.0)', - 'BlenderLightShadows': '(buffer_bias: 0.0, enabled: true)', - 'BlenderShadowSettings': '(cascade_size: 0)', - 'BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.0, intensity: 0.0, low_frequency_boost: ' - '0.0, low_frequency_boost_curvature: 0.0, prefilter_settings: (threshold: 0.0, threshold_softness: ' - '0.0))', - 'BlueprintName': '(" ")', - 'BlueprintsList': '("")', - 'BorderColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', - 'Button': '()', - 'CalculatedClip': '(clip: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)))', - 'Camera': '(clear_color: Default, hdr: true, is_active: true, msaa_writeback: true, order: 0, viewport: None)', - 'Camera2d': '()', - 'Camera3d': '(depth_load_op: Clear(0.0), depth_texture_usages: (0), screen_space_specular_transmission_quality: Low, ' - 'screen_space_specular_transmission_steps: 0)', - 'CameraMainTextureUsages': 'None', - 'CameraRenderGraph': 'None', - 'CameraTrackable': '()', - 'CameraTracking': '(offset: Vec3(x:0.0, y:0.0, z:0.0))', - 'CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, z:0.0))', - 'CascadeShadowConfig': '(bounds: [], minimum_distance: 0.0, overlap_proportion: 0.0)', - 'Cascades': '(cascades: "")', - 'CascadesFrusta': '()', - 'CascadesVisibleEntities': '()', - 'Ccd': '(enabled: true)', - 'Children': '([])', - 'ClusterConfig': 'None', - 'Collider': 'Ball(0.0)', - 'CollidingEntities': '("")', - 'CollisionGroups': '(filters: (0), memberships: (0))', - 'ColorGrading': '(exposure: 0.0, gamma: 0.0, post_saturation: 0.0, pre_saturation: 0.0)', - 'ContactForceEventThreshold': '(0.0)', - 'ContentSize': '()', - 'ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: true, sharpening_strength: 0.0)', - 'CubemapFrusta': '()', - 'CubemapVisibleEntities': '()', - 'Damping': '(angular_damping: 0.0, linear_damping: 0.0)', - 'DebandDither': 'Disabled', - 'DirectionalLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), illuminance: 0.0, shadow_depth_bias: 0.0, ' - 'shadow_normal_bias: 0.0, shadows_enabled: true)', - 'Dominance': '(groups: 0)', - 'EnumComplex': 'Float(0.0)', - 'EnumTest': 'Metal', - 'Exposure': 'None', - 'ExternalForce': '(force: Vec3(x:0.0, y:0.0, z:0.0), torque: Vec3(x:0.0, y:0.0, z:0.0))', - 'ExternalImpulse': '(impulse: Vec3(x:0.0, y:0.0, z:0.0), torque_impulse: Vec3(x:0.0, y:0.0, z:0.0))', - 'FocusPolicy': 'Block', - 'FogSettings': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_color: Rgba(red:1.0, ' - 'green:1.0, blue:0.0, alpha:1.0), directional_light_exponent: 0.0, falloff: Linear(end: 0.0, start: ' - '0.0))', - 'Friction': '(coefficient: 0.0, combine_rule: "")', - 'Frustum': '()', - 'Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)', - 'GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.0, y:0.0, z:0.0), y_axis: Vec3A(x:0.0, y:0.0, z:0.0), z_axis: ' - 'Vec3A(x:0.0, y:0.0, z:0.0)), translation: Vec3A(x:0.0, y:0.0, z:0.0)))', - 'GltfExtras': '(value: " ")', - 'GltfProcessed': '()', - 'GravityScale': '(0.0)', - 'Group': '(0)', - 'Handle<()>': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle>': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.0, sides_scale_mode: ""))', - 'InheritedVisibility': '(true)', - 'Interaction': 'Pressed', - 'Label': '()', - 'LightProbe': '()', - 'LockedAxes': '(0)', - 'MaterialInfo': '(name: " ", source: " ")', - 'Mesh2dHandle': '(Strong(""))', - 'MeshMorphWeights': '(weights: [])', - 'MorphWeights': '(first_mesh: "", weights: [])', - 'Name': '(hash: 0, name: " ")', - 'NestedTupleStuff': '(0.0, 0, (basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0)), ' - 'colors_list: ([]), enable: true, enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, z:0.0))), ' - 'text: " ", toggle: (true)))', - 'NestingTestLevel2': '(basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0)), ' - 'colors_list: ([]), enable: true, enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, z:0.0))), ' - 'text: " ", toggle: (true))', - 'NestingTestLevel3': '(vec: (Vec3(x:0.0, y:0.0, z:0.0)))', - 'NoFrustumCulling': '()', - 'NoWireframe': '()', - 'Node': '(calculated_size: Vec2(x:0.0, y:0.0), outline_offset: 0.0, outline_width: 0.0, stack_index: 0, ' - 'unrounded_size: Vec2(x:0.0, y:0.0))', - 'NotShadowCaster': '()', - 'NotShadowReceiver': '()', - 'OrthographicProjection': '(area: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)), far: 0.0, near: 0.0, scale: ' - '0.0, scaling_mode: Fixed(height: 0.0, width: 0.0), viewport_origin: Vec2(x:0.0, y:0.0))', - 'Outline': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), offset: Auto, width: Auto)', - 'Parent': '(0)', - 'PerspectiveProjection': '(aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0)', - 'Pickable': '()', - 'PlaybackSettings': '(mode: Once, paused: true, spatial: true, spatial_scale: "", speed: 0.0, volume: (0.0))', - 'Player': '()', - 'PointLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), intensity: 0.0, radius: 0.0, range: 0.0, ' - 'shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)', - 'PrimaryWindow': '()', - 'Projection': 'Perspective((aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0))', - 'RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, ' - 'y:0.0)))', - 'RenderLayers': '(0)', - 'Restitution': '(coefficient: 0.0, combine_rule: "")', - 'RigidBody': 'Dynamic', - 'SSAOSettings': '()', - 'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")', - 'Sensor': '()', - 'ShadowFilteringMethod': 'Hardware2x2', - 'SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [])', - 'Sleeping': '(angular_threshold: 0.0, linear_threshold: 0.0, sleeping: true)', - 'SolverGroups': '(filters: (0), memberships: (0))', - 'SpatialListener': '(left_ear_offset: Vec3(x:0.0, y:0.0, z:0.0), right_ear_offset: Vec3(x:0.0, y:0.0, z:0.0))', - 'SpawnHere': '()', - 'SpotLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), inner_angle: 0.0, intensity: 0.0, outer_angle: ' - '0.0, radius: 0.0, range: 0.0, shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)', - 'Sprite': '(anchor: Center, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), custom_size: "", flip_x: true, ' - 'flip_y: true, rect: "")', - 'Style': '(align_content: Default, align_items: Default, align_self: Auto, aspect_ratio: None, border: (bottom: Auto, ' - 'left: Auto, right: Auto, top: Auto), bottom: Auto, column_gap: Auto, direction: Inherit, display: Flex, ' - 'flex_basis: Auto, flex_direction: Row, flex_grow: 0.0, flex_shrink: 0.0, flex_wrap: NoWrap, ' - 'grid_auto_columns: "", grid_auto_flow: Row, grid_auto_rows: "", grid_column: (end: "", span: "", start: ' - '""), grid_row: (end: "", span: "", start: ""), grid_template_columns: "", grid_template_rows: "", height: ' - 'Auto, justify_content: Default, justify_items: Default, justify_self: Auto, left: Auto, margin: (bottom: ' - 'Auto, left: Auto, right: Auto, top: Auto), max_height: Auto, max_width: Auto, min_height: Auto, min_width: ' - 'Auto, overflow: (x: Visible, y: Visible), padding: (bottom: Auto, left: Auto, right: Auto, top: Auto), ' - 'position_type: Relative, right: Auto, row_gap: Auto, top: Auto, width: Auto)', - 'Text': '(justify: Left, linebreak_behavior: WordBoundary, sections: [])', - 'Text2dBounds': '(size: Vec2(x:0.0, y:0.0))', - 'TextFlags': '(needs_new_measure_func: true, needs_recompute: true)', - 'TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.0, y:0.0))', - 'Tonemapping': 'None', - 'Transform': '(rotation: Quat(x:0.0, y:0.0, z:0.0, w:0.0), scale: Vec3(x:0.0, y:0.0, z:0.0), translation: Vec3(x:0.0, ' - 'y:0.0, z:0.0))', - 'TupleTest2': '(0.0, 0, " ")', - 'TupleTestBool': '(true)', - 'TupleTestColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', - 'TupleTestF32': '(0.0)', - 'TupleTestStr': '(" ")', - 'TupleTestU64': '(0)', - 'TupleVec': '([])', - 'TupleVec2': '(Vec2(x:0.0, y:0.0))', - 'TupleVec3': '(Vec3(x:0.0, y:0.0, z:0.0))', - 'TupleVecF32F32': '([])', - 'UiImage': '(flip_x: true, flip_y: true, texture: Strong(""))', - 'UiImageSize': '(size: Vec2(x:0.0, y:0.0))', - 'UnitTest': '()', - 'VecOfColors': '([])', - 'VecOfF32s': '([])', - 'VecOfVec3s2': '([])', - 'Velocity': '(angvel: Vec3(x:0.0, y:0.0, z:0.0), linvel: Vec3(x:0.0, y:0.0, z:0.0))', - 'ViewVisibility': '(true)', - 'Visibility': 'Inherited', - 'VisibleEntities': '()', - 'Window': '(canvas: None, composite_alpha_mode: Auto, cursor: (grab_mode: None, hit_test: true, icon: Default, ' - 'visible: true), decorations: true, enabled_buttons: (close: true, maximize: true, minimize: true), ' - 'focused: true, ime_enabled: true, ime_position: Vec2(x:0.0, y:0.0), internal: (maximize_request: None, ' - 'minimize_request: None, physical_cursor_position: None), mode: Windowed, name: None, position: Automatic, ' - 'present_mode: AutoVsync, prevent_default_event_handling: true, resizable: true, resize_constraints: ' - '(max_height: 0.0, max_width: 0.0, min_height: 0.0, min_width: 0.0), resolution: (physical_height: 0, ' - 'physical_width: 0, scale_factor: 0.0, scale_factor_override: None), title: " ", transparent: true, ' - 'visible: true, window_level: AlwaysOnBottom, window_theme: "")', - 'Wireframe': '()', - 'WireframeColor': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', - 'ZIndex': 'Local(0)'} - - - - -expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()', - 'Aabb': '(center: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), half_extents: ' - 'Vec3A(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', - 'AdditionalMassProperties': 'Mass(0.42888906598091125)', - 'AnimationPlayer': '(animation: "", paused: true)', - 'Animations': '(named_animations: "")', - 'AutoAABBCollider': 'Capsule', - 'BackgroundColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842))', - 'BasicTest': '(a: 0.5714026093482971, b: 54, c: "psagopiu")', - 'BlenderBackgroundShader': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842), strength: 0.8133212327957153)', - 'BlenderLightShadows': '(buffer_bias: 0.5714026093482971, enabled: false)', - 'BlenderShadowSettings': '(cascade_size: 73)', - 'BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.42888906598091125, intensity: ' - '0.5780913233757019, low_frequency_boost: 0.20609822869300842, low_frequency_boost_curvature: ' - '0.8133212327957153, prefilter_settings: (threshold: 0.8235888481140137, threshold_softness: ' - '0.6534725427627563))', - 'BlueprintName': '("sbnpsago")', - 'BlueprintsList': '("")', - 'BorderColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842))', - 'Button': '()', - 'CalculatedClip': '(clip: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: Vec2(x:0.5780913233757019, ' - 'y:0.20609822869300842)))', - 'Camera': '(clear_color: None, hdr: false, is_active: false, msaa_writeback: false, order: 73, viewport: None)', - 'Camera2d': '()', - 'Camera3d': '(depth_load_op: Clear(0.42888906598091125), depth_texture_usages: (73), ' - 'screen_space_specular_transmission_quality: Low, screen_space_specular_transmission_steps: 26)', - 'CameraMainTextureUsages': 'None', - 'CameraRenderGraph': 'None', - 'CameraTrackable': '()', - 'CameraTracking': '(offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))', - 'CameraTrackingOffset': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))', - 'CascadeShadowConfig': '(bounds: [0.42888906598091125], minimum_distance: 0.5780913233757019, overlap_proportion: ' - '0.20609822869300842)', - 'Cascades': '(cascades: "")', - 'CascadesFrusta': '()', - 'CascadesVisibleEntities': '()', - 'Ccd': '(enabled: true)', - 'Children': '([0])', - 'ClusterConfig': 'None', - 'Collider': 'Ball(0.42888906598091125)', - 'CollidingEntities': '("")', - 'CollisionGroups': '(filters: (73), memberships: (4))', - 'ColorGrading': '(exposure: 0.5714026093482971, gamma: 0.42888906598091125, post_saturation: 0.5780913233757019, ' - 'pre_saturation: 0.20609822869300842)', - 'ContactForceEventThreshold': '(0.5714026093482971)', - 'ContentSize': '()', - 'ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: false, sharpening_strength: 0.42888906598091125)', - 'CubemapFrusta': '()', - 'CubemapVisibleEntities': '()', - 'Damping': '(angular_damping: 0.5714026093482971, linear_damping: 0.42888906598091125)', - 'DebandDither': 'Disabled', - 'DirectionalLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842), illuminance: 0.8133212327957153, shadow_depth_bias: ' - '0.8235888481140137, shadow_normal_bias: 0.6534725427627563, shadows_enabled: false)', - 'Dominance': '(groups: 73)', - 'EnumComplex': 'StructLike(a: 0.03258506581187248, b: 61, c: "sagopiuz")', - 'EnumTest': 'Squishy', - 'Exposure': 'None', - 'ExternalForce': '(force: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), torque: ' - 'Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', - 'ExternalImpulse': '(impulse: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), ' - 'torque_impulse: Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', - 'FocusPolicy': 'Block', - 'FogSettings': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842), directional_light_color: Rgba(red:0.8133212327957153, ' - 'green:0.8235888481140137, blue:0.6534725427627563, alpha:0.16022956371307373), ' - 'directional_light_exponent: 0.5206693410873413, falloff: ExponentialSquared(density: ' - '0.07608934491872787))', - 'Friction': '(coefficient: 0.5714026093482971, combine_rule: "")', - 'Frustum': '()', - 'Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)', - 'GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), ' - 'y_axis: Vec3A(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137), z_axis: ' - 'Vec3A(x:0.6534725427627563, y:0.16022956371307373, z:0.5206693410873413)), translation: ' - 'Vec3A(x:0.3277728259563446, y:0.24999667704105377, z:0.952816903591156)))', - 'GltfExtras': '(value: "sbnpsago")', - 'GltfProcessed': '()', - 'GravityScale': '(0.5714026093482971)', - 'Group': '(73)', - 'Handle<()>': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle>': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'Handle': 'Strong("")', - 'ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.42888906598091125, ' - 'sides_scale_mode: ""))', - 'InheritedVisibility': '(true)', - 'Interaction': 'None', - 'Label': '()', - 'LightProbe': '()', - 'LockedAxes': '(73)', - 'MaterialInfo': '(name: "sbnpsago", source: "piuzfbqp")', - 'Mesh2dHandle': '(Strong(""))', - 'MeshMorphWeights': '(weights: [0.42888906598091125])', - 'MorphWeights': '(first_mesh: "", weights: [0.42888906598091125])', - 'Name': '(hash: 73, name: "bnpsagop")', - 'NestedTupleStuff': '(0.5714026093482971, 54, (basic: (a: 0.4825616776943207, b: 1, c: "gopiuzfb"), color: ' - '(Rgba(red:0.5206693410873413, green:0.3277728259563446, blue:0.24999667704105377, ' - 'alpha:0.952816903591156)), colors_list: ([Rgba(red:0.0445563830435276, green:0.8601610660552979, ' - 'blue:0.6031906008720398, alpha:0.38160598278045654), Rgba(red:0.2836182117462158, ' - 'green:0.6749648451805115, blue:0.456831157207489, alpha:0.6858614683151245)]), enable: true, ' - 'enum_inner: Rock, nested: (vec: (Vec3(x:0.1329781413078308, y:0.7678378224372864, ' - 'z:0.9824132323265076))), text: "otmbsahe", toggle: (false)))', - 'NestingTestLevel2': '(basic: (a: 0.5714026093482971, b: 54, c: "psagopiu"), color: (Rgba(red:0.8106188178062439, ' - 'green:0.03440357372164726, blue:0.49008557200431824, alpha:0.07608934491872787)), colors_list: ' - '([Rgba(red:0.0445563830435276, green:0.8601610660552979, blue:0.6031906008720398, ' - 'alpha:0.38160598278045654), Rgba(red:0.2836182117462158, green:0.6749648451805115, ' - 'blue:0.456831157207489, alpha:0.6858614683151245)]), enable: true, enum_inner: Rock, nested: ' - '(vec: (Vec3(x:0.1329781413078308, y:0.7678378224372864, z:0.9824132323265076))), text: ' - '"otmbsahe", toggle: (false))', - 'NestingTestLevel3': '(vec: (Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019)))', - 'NoFrustumCulling': '()', - 'NoWireframe': '()', - 'Node': '(calculated_size: Vec2(x:0.5714026093482971, y:0.42888906598091125), outline_offset: 0.5780913233757019, ' - 'outline_width: 0.20609822869300842, stack_index: 62, unrounded_size: Vec2(x:0.8235888481140137, ' - 'y:0.6534725427627563))', - 'NotShadowCaster': '()', - 'NotShadowReceiver': '()', - 'OrthographicProjection': '(area: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: ' - 'Vec2(x:0.5780913233757019, y:0.20609822869300842)), far: 0.8133212327957153, near: ' - '0.8235888481140137, scale: 0.6534725427627563, scaling_mode: ' - 'WindowSize(0.03440357372164726), viewport_origin: Vec2(x:0.49008557200431824, ' - 'y:0.07608934491872787))', - 'Outline': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842), offset: VMax(0.4912964105606079), width: Percent(0.6534725427627563))', - 'Parent': '(0)', - 'PerspectiveProjection': '(aspect_ratio: 0.5714026093482971, far: 0.42888906598091125, fov: 0.5780913233757019, near: ' - '0.20609822869300842)', - 'Pickable': '()', - 'PlaybackSettings': '(mode: Once, paused: false, spatial: false, spatial_scale: "", speed: 0.5780913233757019, ' - 'volume: (0.20609822869300842))', - 'Player': '()', - 'PointLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842), intensity: 0.8133212327957153, radius: 0.8235888481140137, range: ' - '0.6534725427627563, shadow_depth_bias: 0.16022956371307373, shadow_normal_bias: 0.5206693410873413, ' - 'shadows_enabled: false)', - 'PrimaryWindow': '()', - 'Projection': 'Perspective((aspect_ratio: 0.42888906598091125, far: 0.5780913233757019, fov: 0.20609822869300842, ' - 'near: 0.8133212327957153))', - 'RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: Vec2(x:0.5714026093482971, ' - 'y:0.42888906598091125), min: Vec2(x:0.5780913233757019, y:0.20609822869300842)))', - 'RenderLayers': '(73)', - 'Restitution': '(coefficient: 0.5714026093482971, combine_rule: "")', - 'RigidBody': 'Dynamic', - 'SSAOSettings': '()', - 'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")', - 'Sensor': '()', - 'ShadowFilteringMethod': 'Jimenez14', - 'SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [0, 0])', - 'Sleeping': '(angular_threshold: 0.5714026093482971, linear_threshold: 0.42888906598091125, sleeping: true)', - 'SolverGroups': '(filters: (73), memberships: (4))', - 'SpatialListener': '(left_ear_offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), ' - 'right_ear_offset: Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', - 'SpawnHere': '()', - 'SpotLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842), inner_angle: 0.8133212327957153, intensity: 0.8235888481140137, ' - 'outer_angle: 0.6534725427627563, radius: 0.16022956371307373, range: 0.5206693410873413, ' - 'shadow_depth_bias: 0.3277728259563446, shadow_normal_bias: 0.24999667704105377, shadows_enabled: true)', - 'Sprite': '(anchor: Custom(Vec2(x:0.03258506581187248, y:0.4825616776943207)), color: Rgba(red:0.014832446351647377, ' - 'green:0.46258050203323364, blue:0.4912964105606079, alpha:0.27752065658569336), custom_size: "", flip_x: ' - 'true, flip_y: false, rect: "")', - 'Style': '(align_content: SpaceAround, align_items: Default, align_self: Baseline, aspect_ratio: ' - 'Some(0.5780913233757019), border: (bottom: Px(0.46258050203323364), left: Vw(0.8235888481140137), right: ' - 'VMin(0.8106188178062439), top: Auto), bottom: Vh(0.49008557200431824), column_gap: Auto, direction: ' - 'Inherit, display: None, flex_basis: Percent(0.0445563830435276), flex_direction: Column, flex_grow: ' - '0.6031906008720398, flex_shrink: 0.38160598278045654, flex_wrap: Wrap, grid_auto_columns: "", ' - 'grid_auto_flow: RowDense, grid_auto_rows: "", grid_column: (end: "", span: "", start: ""), grid_row: (end: ' - '"", span: "", start: ""), grid_template_columns: "", grid_template_rows: "", height: ' - 'Vw(0.17467059195041656), justify_content: FlexEnd, justify_items: Stretch, justify_self: End, left: ' - 'Px(0.45692843198776245), margin: (bottom: VMax(0.9824132323265076), left: Vw(0.6133268475532532), right: ' - 'Auto, top: Vh(0.004055144265294075)), max_height: Px(0.1949533075094223), max_width: ' - 'Percent(0.5363451838493347), min_height: VMax(0.8981962203979492), min_width: Percent(0.666689932346344), ' - 'overflow: (x: Clip, y: Clip), padding: (bottom: Vw(0.06499417871236801), left: Vh(0.32468828558921814), ' - 'right: Vh(0.15641891956329346), top: Px(0.9697836637496948)), position_type: Relative, right: Auto, ' - 'row_gap: Auto, top: Vw(0.3011642396450043), width: Vh(0.6578909158706665))', - 'Text': '(justify: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: Rgba(red:0.4825616776943207, ' - 'green:0.014832446351647377, blue:0.46258050203323364, alpha:0.4912964105606079), font: Weak(Index(index: ' - '"")), font_size: 0.03440357372164726), value: "pkchxlbn"), (style: (color: Rgba(red:0.8601610660552979, ' - 'green:0.6031906008720398, blue:0.38160598278045654, alpha:0.2836182117462158), font: Weak(Uuid(uuid: ' - '"73b3b118-7d01-4778-8bcc-4e79055f5d22")), font_size: 0.17467059195041656), value: "jvleoyho")])', - 'Text2dBounds': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', - 'TextFlags': '(needs_new_measure_func: true, needs_recompute: false)', - 'TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', - 'Tonemapping': 'None', - 'Transform': '(rotation: Quat(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019, ' - 'w:0.20609822869300842), scale: Vec3(x:0.8133212327957153, y:0.8235888481140137, z:0.6534725427627563), ' - 'translation: Vec3(x:0.16022956371307373, y:0.5206693410873413, z:0.3277728259563446))', - 'TupleTest2': '(0.5714026093482971, 54, "psagopiu")', - 'TupleTestBool': '(true)', - 'TupleTestColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842))', - 'TupleTestF32': '(0.5714026093482971)', - 'TupleTestStr': '("sbnpsago")', - 'TupleTestU64': '(73)', - 'TupleVec': '(["npsagopi"])', - 'TupleVec2': '(Vec2(x:0.5714026093482971, y:0.42888906598091125))', - 'TupleVec3': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))', - 'TupleVecF32F32': '([(0.42888906598091125, 0.5780913233757019)])', - 'UiImage': '(flip_x: true, flip_y: false, texture: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")))', - 'UiImageSize': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', - 'UnitTest': '()', - 'VecOfColors': '([Rgba(red:0.42888906598091125, green:0.5780913233757019, blue:0.20609822869300842, ' - 'alpha:0.8133212327957153)])', - 'VecOfF32s': '([0.42888906598091125])', - 'VecOfVec3s2': '([(Vec3(x:0.42888906598091125, y:0.5780913233757019, z:0.20609822869300842))])', - 'Velocity': '(angvel: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), linvel: ' - 'Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))', - 'ViewVisibility': '(true)', - 'Visibility': 'Visible', - 'VisibleEntities': '()', - 'Window': '(canvas: None, composite_alpha_mode: PostMultiplied, cursor: (grab_mode: Confined, hit_test: true, icon: ' - 'Default, visible: false), decorations: false, enabled_buttons: (close: true, maximize: false, minimize: ' - 'true), focused: false, ime_enabled: true, ime_position: Vec2(x:0.8106188178062439, y:0.03440357372164726), ' - 'internal: (maximize_request: Some(false), minimize_request: None, physical_cursor_position: None), mode: ' - 'SizedFullscreen, name: None, position: Centered(Current), present_mode: Immediate, ' - 'prevent_default_event_handling: false, resizable: false, resize_constraints: (max_height: ' - '0.42126399278640747, max_width: 0.8268482089042664, min_height: 0.2623211145401001, min_width: ' - '0.17467059195041656), resolution: (physical_height: 38, physical_width: 84, scale_factor: ' - '0.36258742213249207, scale_factor_override: Some(0.7678378224372864)), title: "hotmbsah", transparent: ' - 'false, visible: false, window_level: Normal, window_theme: "")', - 'Wireframe': '()', - 'WireframeColor': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' - 'alpha:0.20609822869300842))', - 'ZIndex': 'Local(54)'} diff --git a/tools/bevy_components/tests/test_shuffler.py b/tools/bevy_components/tests/test_shuffler.py deleted file mode 100644 index 20ade74..0000000 --- a/tools/bevy_components/tests/test_shuffler.py +++ /dev/null @@ -1,160 +0,0 @@ -import bpy -from .component_values_shuffler import component_values_shuffler -from .setup_data import setup_data - -def test_shuffler(setup_data): - registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] - bpy.ops.object.reload_registry() - - type_infos = registry.type_infos - object = bpy.context.object - - add_component_operator = bpy.ops.object.add_bevy_component - - short_name = "BasicTest" - component_type = registry.short_names_to_long_names[short_name] - - add_component_operator(component_type=component_type) - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 10, property_group=propertyGroup, definition=definition, registry=registry) - - assert getattr(propertyGroup, 'a') == 0.5714026093482971 - assert getattr(propertyGroup, 'b') == 54 - assert getattr(propertyGroup, 'c') == "psagopiu" - - - # Testing a more complex component - short_name = "NestingTestLevel2" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == '(basic: (a: 0.5219839215278625, b: 38, c: "ljfywwrv"), color: (Rgba(red:0.2782765030860901, green:0.9174930453300476, blue:0.24890311062335968, alpha:0.815186083316803)), colors_list: ([Rgba(red:0.2523837685585022, green:0.5016026496887207, blue:0.317435085773468, alpha:0.8463277816772461), Rgba(red:0.945193886756897, green:0.4015909433364868, blue:0.9984470009803772, alpha:0.06219279021024704)]), enable: true, enum_inner: Wood, nested: (vec: (Vec3(x:0.1509154736995697, y:0.7055686116218567, z:0.5588918924331665))), text: "vgkrdwuc", toggle: (false))' - - - # And another complex component - short_name = "EnumComplex" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == 'StructLike(a: 0.41416797041893005, b: 38, c: "ljfywwrv")' - - # And another complex component - short_name = "AnimationPlayer" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == '(animation: "", paused: true)' - - - - # And another complex component - short_name = "VecOfColors" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == '([Rgba(red:0.8066907525062561, green:0.9604947566986084, blue:0.2896253764629364, alpha:0.766107439994812), Rgba(red:0.7042198777198792, green:0.6613830327987671, blue:0.11016204953193665, alpha:0.02693677879869938)])' - - - # And another complex component - short_name = "VecOfF32s" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == '([0.8066907525062561, 0.9604947566986084])' - - # And another complex component - short_name = "SkinnedMesh" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == '(inverse_bindposes: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")), joints: [0, 0])' - - - # And another complex component - short_name = "CameraRenderGraph" - component_type = registry.short_names_to_long_names[short_name] - add_component_operator(component_type=component_type) - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) - - definition = type_infos[component_type] - component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) - - print("propertyGroup", object[short_name]) - # cheating / making things easier for us for complex types: we use the custom property value - assert object[short_name] == 'None' - \ No newline at end of file diff --git a/tools/blenvy/README.md b/tools/blenvy/README.md new file mode 100644 index 0000000..b54cab6 --- /dev/null +++ b/tools/blenvy/README.md @@ -0,0 +1,350 @@ +# Blenvy: Blender add-on + + +This [Blender addon](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/tools/blenvy) gives you: +- an easy to use UI to add and configure your [Bevy](https://bevyengine.org/) components inside Blender + - the UI is **automatically generated** based on a **registry schema** file, an export of all your **registered** Bevy components's information, generated +by the registry export part of the [Blenvy](https://crates.io/crates/blenvy) crate + - the ability to **toggle components** on/off without having to remove the component from the object +- an easy way to create blueprints/prefabs (just collections !) & levels +- a way to setup you assets for your levels & blueprints +- an automatic export of your level/world from Blender to gltf whenever you save your Blend file. + - export of used /marked collections as [Gltf blueprints](../../crates/blenvy/README.md) + - change detection, so that only the levels & blueprints you have changed get exported when you save your blend file + - export of material librairies + + +If you want to know more about the technical details , see [here]() + +> IMPORTANT !! if you have previously used the "old" add-ons (*gltf_auto_export* & *bevy_components*), please see the [migration guide](../../Migration_guide.md) +If you can I would generally recommend starting fresh, but a lot of effort has been put to make transitioning easier + + +## Installation: + + +* grab the latest release zip file + +![blender addon install](./docs/blender_addon_install_zip.png) + + +* in Blender go to edit => preferences => install + +![blender addon install](./docs/blender_addon_install.png) + +* choose the path where ```blenvy.zip``` is stored + +![blender addon install](./docs/blender_addon_install2.png) + + * up to Blender 4.1 + * for Blender 4.2 , just drag & drop the zip file onto Blender to start the installation process + + +## Quickstart + +* set your level & library scenes (the only things that are not pre-configured) + +![blenvy common settings](./docs/blenvy_configuration_common.png) + +* create your blueprints & levels +* add components (remember to configure the Bevy side first ) +* save your blend file at any point , the rest is done automatically (export of levels & blueprints, etc) + + +## Configuration: + +### Bevy side + + - setup the [Blenvy crate](https://crates.io/crates/blenvy) for your project (see the crate's documentation for that), and compile/run it to get the ```registry.json``` file to enable adding/editing your components in Blender + +### Blender side + + +> The add-on comes almost completely pre-configured with sensible defaults, but you can set the following settings to your liking + +#### Common + +The first tab (and the one that is open by default in a new project) contains the common settings: + +![blenvy common settings](./docs/blenvy_configuration_common.png) + +you **need** to tell Blenvy + + - what your level scenes are (what Blender scenes should become levels in Bevy) + - what your library scenes are (what Blender scenes will store your library of re-useable blueprints) + +Blenvy is opinionated ! + + - keep you art/sources (usually not delivered with your game) seperate from your game assets + - keep your blueprints/levels/materials gltf files seperate + +##### Root Folder + +- this is the same folder as your Bevy projects main folder: the path here is relative to the current .blend file + +##### Assets Folder + +- a path, relative to the *root* folder above, where you want to store your assets (delivered with your game) + +##### Library Folder + +- a path, relative to the *assets* folder above, where you want to store your *blueprints* + +##### Levels Folder + +- a path, relative to the *assets* folder above, where you want to store your *levels* + +##### Materials Folder + +- a path, relative to the *assets* folder above, where you want to store your *materials* + +##### + - level scenes: what are the scenes in your .blend file that are levels/worlds + - library scenes: what are the scenes in your .blend file that contain your libraries of blueprints (that you then use in your levels) + + +#### Recomended folder structure + +![recomended folder structure](./docs/blenvy_recommended_folder_structure.png) + +![recomended folder structure art](./docs/blenvy_recommended_folder_structure_art.png) + +![recomended folder structure assets](./docs/blenvy_recommended_folder_structure_assets.png) + + +#### Components + +The second tab contains the component settings: + +![blenvy component settings](./docs/blenvy_configuration_components.png) + + +> you normally do not need to do anything, as the defaults are already pre-set to match those on the Bevy side for the location of the ```registry.json``` file, unless you want to store it somewhere other than ```assets/registry.json``` + +- Go to the new Components tab in the **configuration** tab + +![configuration](./docs/configuration.png) + +- click on the button to select your registry.json file (in the "configuration" panel) + +![configuration 2](./docs/configuration2.png) + +- the list of available components will appear + +![configuration 3](./docs/configuration3.png) + + +##### registry file polling + +* by default, the add-on will check for changes in your registry file every second, and refresh the UI accordingly +* you can set the polling frequency or turn it off if you do not want auto-refresh + +![registry file polling](./docs/registry_polling.png) + +#### Export + +Last but not least, the export/ auto-export settings tab + +![blenvy export settings](./docs/blenvy_configuration_export.png) + +### Materials + +You can enable this option to automatically generate a **material library** files that combines all the materials in use in your blueprints. + +![material_library](./docs/blender_addon_materials2.png) + +Since each blueprint is normally a completely independant gltf file, without this option, if you have a material with a large texture for example, +**ALL** of your blueprints using that material will embed that large texture, leading to **significant bloat & memory use**. + +- When this option is enabled, you get a single material library per Blender project, and a **MaterialInfo** component is inserted into each object using a material. +- The correct material will then be inserted on the Bevy side (that loads any number of material libraries that you need) into the correct mesh (see the configuration +options in **bevy_gltf_blueprints** for more information on that) +- Only one material per object is supported at this stage, ie the last material slot's material is the one that is going to be used + +![material_library](./docs/blender_addon_materials.png) + +TLDR: Use this option to make sure that each blueprint file does not contain a copy of the same materials + + +### Multiple blend file workflow + +If you want to use multiple blend files, use Blender's asset library etc, we got you coverred too ! +There are only a few things to keep in mind + +#### Assets/library/blueprints files +- mark your library scenes as specified above, but **do NOT** specify a **level** scene +- mark any collection in your scenes as "assets" +- choose "split" for the combine mode (as you want your gltf blueprints to be saved for external use) +- do your Blender things as normal +- anytime you save your file, it will automatically export any relevant collections/blueprints +- (optional) activate the **material library** option, so you only have one set of material per asset library (recomended) + +#### Level/world files +- mark your level scenes as specified above ( personally I recommended **NOT** specifying a **library** scene in this case to keep things tidy, but that is up to you) +- configure your asset libraries as you would usually do, I recomend using the "link" mode so that any changes to asset files are reflected correctly +- drag & drop any assets from the blueprints library (as you would normally do in Blender as well) +- choose "split" for the combine mode (as you want your gltf blueprints to be external usually & use the gltf files generated from your assets library) +- do your Blender things as normal +- anytime you save your file, it will automatically export your level(s) + +Take a look at the [relevant](../../examples/demo/) example for more [details](../../examples/demo/art/) + + + + +## Useage + +### Components + +#### adding components + +- to add a component, select an object, collection, mesh or material and then select the component from the components list: (the full type information will be displayed as tooltip) + +![components list](./docs/components_list.png) + +- click on the dropdown to get the full list of available components + +![components list](./docs/components_list2.png) + +- you can also filter components by name for convenience + +![filter components](./docs/filter_components.png) + +- add a component by clicking on the "add component" button once you have selected your desired component + + it will appear in the component list for that object + +![add component](./docs/add_component.png) + + +#### editing components + +- to edit a component's value just use the UI: + +![edit component](./docs/edit_component.png) + +#### copy & pasting + +- you can also copy & paste components between objects + +- click on the "copy component button" of the component you want to copy + +![copy component](./docs/copy_component.png) + +- then select the object you want to copy the component (& its value) to, and click on the paste button. + +It will add the component to the select object + +![paste component](./docs/paste_component.png) + +> if the target object already has the same component, its values will be overwritten + + +#### Additional components UI features + + +##### Toggling component details + +- for large/ complex components you can toggle the details of that component: + +![toggle details](./docs/toggle_details.png) + + +##### Supported components + +- normally (minus any bugs, please report those!) all components using **registered** types should be useable and editable +- this includes (non exhaustive list): + * enums (even complex ones !) + + ![enums](./docs/enums.png) + + ![enums](./docs/enums2.png) + + + * complex structs, with various types of fields (including nested ones) + + ![complex](./docs/complex_components2.png) + + * lists/ vecs (here a vec of tuples) + + ![lists](./docs/vecs_lists.png) + + * etc ! + +##### Unregistered types & error handling + +- non registered types can be viewed in this panel : (can be practical to see if you have any missing registrations too!) + + ![unregistered types](./docs/unregistered_types.png) + +- if you have a component made up of unregistered structs/enums etc, you will get visual feedback & the component will be deactivated + + ![invalid component](./docs/invalid_components.png) + + > see [here](#invalidunregistered-type-renaming--conversion) for ways to convert invalid / unregistered components to other types. + + +- if you are encountering this type of view: don't panic your component data is not gone ! It just means you need to reload the registry data by clicking on the relevant button + + ![missing registry data](./docs/missing_registry_data.png) + +## Levels + +## Blueprints + + +## Technical details + +- adds **metadata** to objects containing information about what components it uses + some extra information +- uses Blender's **PropertyGroups** to generate custom UIs & connects those groups with the custom properties so that no matter the complexity +of your Bevy components you get a nicely packed custom_property to use with ... +- supports any number of main/level scenes + - Blender scenes where you define your levels, and all collection instances are replaced with "pointers" to other gltf files (all automatic) +- supports any number of library scenes + - Blender scenes where you define the assets that you use in your levels, in the form of collections +- automatic export of **changed** objects & collections only ! a sort of "incremental export", where only the changed collections (if in use) + get exported when you save your blend file + +### Components + +changing the values of a component in the UI will automatically update the value of the underlying entry in the ```bevy_components``` custom property + +![edit component](./docs/edit_component2.png) + +### Internal process (simplified) + +This is the internal logic of the export process with blueprints (simplified) + +![process](./docs/process.svg) + +ie this is an example scene... + +![](./docs/workflow_original.jpg) + +and what actually gets exported for the level scene/world/level + +![](./docs/workflow_empties.jpg) + +all collections instances replaced with empties, and all those collections exported to gltf files as seen above + + +## Known issues & limitations: + +* **Range** data (ie ```Range``` etc) are not handled at this time (issue seems to be on the Bevy side) +* **Entity** structs are always set to 0 (setting entity values on the Blender side at this time does not make much sense anyway) + + +## Development + +- I highly recomend (if you are using vscode like me) to use +[this](https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development) excellent extension , works easilly and fast , even for the latest +versions of Blender (v4.0 as of this writing) +- this [article](https://polynook.com/learn/set-up-blender-addon-development-environment-in-windows) might also help out +(easy enough to get it working on linux too) + +## License + +This tool, all its code, contents & assets is Dual-licensed under either of + +- Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE_APACHE.md) or https://www.apache.org/licenses/LICENSE-2.0) +- MIT license ([LICENSE-MIT](../LICENSE_MIT.md) or https://opensource.org/licenses/MIT) \ No newline at end of file diff --git a/tools/blenvy/__init__.py b/tools/blenvy/__init__.py new file mode 100644 index 0000000..5fc93d9 --- /dev/null +++ b/tools/blenvy/__init__.py @@ -0,0 +1,183 @@ +bl_info = { + "name": "blenvy", + "author": "kaosigh", + "version": (0, 1, 0), + "blender": (3, 4, 0), + "location": "File > Import-Export", + "description": "tooling for the Bevy engine", + "warning": "", + "wiki_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow", + "tracker_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow/issues/new", + "category": "Import-Export" +} + +import bpy +from bpy.app.handlers import persistent +from bpy.props import (StringProperty) + + +# components management +from .add_ons.bevy_components.components.operators import BLENVY_OT_component_copy, BLENVY_OT_component_fix, BLENVY_OT_component_rename_component, BLENVY_OT_component_remove_from_all_items, BLENVY_OT_component_remove, BLENVY_OT_component_from_custom_property, BLENVY_OT_component_paste, BLENVY_OT_component_add, RenameHelper, BLENVY_OT_component_toggle_visibility, BLENVY_OT_components_refresh_custom_properties_all, BLENVY_OT_components_refresh_custom_properties_current, BLENVY_OT_components_refresh_propgroups_all, BLENVY_OT_components_refresh_propgroups_current +from .add_ons.bevy_components.registry.registry import ComponentsRegistry,MissingBevyType +from .add_ons.bevy_components.registry.operators import (BLENVY_OT_components_registry_reload, BLENVY_OT_components_registry_browse_schema) +from .add_ons.bevy_components.registry.ui import (BLENVY_PT_components_missing_types_panel, BLENVY_UL_components_missing_types) +from .add_ons.bevy_components.components.metadata import (ComponentMetadata, ComponentsMeta) +from .add_ons.bevy_components.components.lists import BLENVY_OT_component_list_actions +from .add_ons.bevy_components.components.maps import BLENVY_OT_component_map_actions +from .add_ons.bevy_components.components.ui import BLENVY_PT_components_panel, BLENVY_PT_component_tools_panel +from .add_ons.bevy_components.settings import ComponentsSettings +from .add_ons.bevy_components.utils import BLENVY_OT_item_select + +# auto export +from .add_ons.auto_export import gltf_post_export_callback +from .add_ons.auto_export.common.tracker import AutoExportTracker +from .add_ons.auto_export.settings import AutoExportSettings + +# asset management +from .assets.ui import BLENVY_PT_assets_panel +from .assets.assets_registry import Asset, AssetsRegistry +from .assets.operators import BLENVY_OT_assets_browse, BLENVY_OT_assets_add, BLENVY_OT_assets_remove, BLENVY_OT_assets_generate_files + +# levels management +from .levels.ui import BLENVY_PT_levels_panel +from .levels.operators import BLENVY_OT_level_select + +# blueprints management +from .blueprints.ui import BLENVY_PT_blueprints_panel +from .blueprints.blueprints_registry import BlueprintsRegistry +from .blueprints.operators import BLENVY_OT_blueprint_select + +# blenvy core +from .core.blenvy_manager import BlenvyManager +from .core.operators import BLENVY_OT_configuration_switch, BLENVY_OT_tooling_switch +from .core.ui.ui import (BLENVY_PT_SidePanel) +from .core.ui.scenes_list import BLENVY_OT_scenes_list_actions +from .assets.assets_folder_browser import BLENVY_OT_assets_paths_browse + + +# this needs to be here, as it is how Blender's gltf exporter callbacks are defined, at the add-on root level +def glTF2_post_export_callback(data): + gltf_post_export_callback(data) + + +classes = [ + # common/core + BLENVY_OT_scenes_list_actions, + BLENVY_OT_assets_paths_browse, + + # blenvy + BLENVY_PT_SidePanel, + + # bevy components + ComponentsSettings, + BLENVY_OT_component_add, + BLENVY_OT_component_copy, + BLENVY_OT_component_paste, + BLENVY_OT_component_remove, + BLENVY_OT_component_remove_from_all_items, + BLENVY_OT_component_fix, + BLENVY_OT_component_rename_component, + RenameHelper, + BLENVY_OT_component_from_custom_property, + BLENVY_OT_component_toggle_visibility, + + ComponentMetadata, + ComponentsMeta, + MissingBevyType, + ComponentsRegistry, + + BLENVY_OT_components_registry_browse_schema, + BLENVY_OT_components_registry_reload, + BLENVY_OT_components_refresh_custom_properties_all, + BLENVY_OT_components_refresh_custom_properties_current, + BLENVY_OT_components_refresh_propgroups_all, + BLENVY_OT_components_refresh_propgroups_current, + + BLENVY_OT_item_select, + + BLENVY_PT_components_panel, + BLENVY_PT_component_tools_panel, + BLENVY_UL_components_missing_types, + BLENVY_PT_components_missing_types_panel, + + BLENVY_OT_component_list_actions, + BLENVY_OT_component_map_actions, + + # gltf auto export + AutoExportTracker, + AutoExportSettings, + + # blenvy + BlenvyManager, + BLENVY_OT_tooling_switch, + BLENVY_OT_configuration_switch, + + Asset, + AssetsRegistry, + BLENVY_OT_assets_add, + BLENVY_OT_assets_remove, + BLENVY_OT_assets_generate_files, + BLENVY_OT_assets_browse, + BLENVY_PT_assets_panel, + + BLENVY_PT_levels_panel, + BLENVY_OT_level_select, + + BlueprintsRegistry, + BLENVY_OT_blueprint_select, + BLENVY_PT_blueprints_panel, +] + + +@persistent +def post_update(scene, depsgraph): + bpy.context.window_manager.auto_export_tracker.deps_post_update_handler( scene, depsgraph) + +@persistent +def post_save(scene, depsgraph): + bpy.context.window_manager.auto_export_tracker.save_handler( scene, depsgraph) + +@persistent +def post_load(file_name): + print("POST LOAD") + blenvy = bpy.context.window_manager.blenvy + if blenvy is not None: + blenvy.load_settings() + +def register(): + for cls in classes: + bpy.utils.register_class(cls) + + bpy.app.handlers.load_post.append(post_load) + # for some reason, adding these directly to the tracker class in register() do not work reliably + bpy.app.handlers.depsgraph_update_post.append(post_update) + bpy.app.handlers.save_post.append(post_save) + + + """ handle = object() + + subscribe_to = bpy.types.Scene, "name" # + + def notify_test(context): + #if (context.scene.type == 'MESH'): + print("Renamed", dir(context), context.scenes) + + bpy.msgbus.subscribe_rna( + key=subscribe_to, + owner=bpy, + args=(bpy.context,), + notify=notify_test, + )""" + + + #bpy.msgbus.publish_rna(key=subscribe_to) + + + + +def unregister(): + for cls in classes: + bpy.utils.unregister_class(cls) + bpy.app.handlers.load_post.remove(post_load) + bpy.app.handlers.depsgraph_update_post.remove(post_update) + bpy.app.handlers.save_post.remove(post_save) diff --git a/tools/bevy_components/propGroups/__init__.py b/tools/blenvy/add_ons/__init__.py similarity index 100% rename from tools/bevy_components/propGroups/__init__.py rename to tools/blenvy/add_ons/__init__.py diff --git a/tools/blenvy/add_ons/auto_export/__init__.py b/tools/blenvy/add_ons/auto_export/__init__.py new file mode 100644 index 0000000..6cf2318 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/__init__.py @@ -0,0 +1,61 @@ +import os +import json +import pathlib +import bpy +from blenvy.settings import generate_complete_settings_dict +from io_scene_gltf2 import ExportGLTF2_Base + + +def cleanup_file(): + gltf_filepath = bpy.context.window_manager.auto_export_tracker.dummy_file_path + if os.path.exists(gltf_filepath): + os.remove(gltf_filepath) + # in case of seperate gltf/bin files, also remove bin file + if gltf_filepath.endswith('gltf'): + bin_path = os.path.join(os.path.dirname(gltf_filepath), pathlib.Path(gltf_filepath).stem + ".bin") + if os.path.exists(bin_path): + os.remove(bin_path) + return None + else: + return 1.0 + +def gltf_post_export_callback(data): + #print("post_export", data) + blenvy = bpy.context.window_manager.blenvy + tracker = bpy.context.window_manager.auto_export_tracker + tracker.export_finished() + + gltf_settings_backup = tracker.gltf_settings_backup + gltf_filepath = data["gltf_filepath"] + gltf_export_id = data['gltf_export_id'] + if gltf_export_id == "blenvy": + # some more absurdity: apparently the file is not QUITE done when the export callback is called, so we have to introduce this timer to remove the temporary file correctly + tracker.dummy_file_path = gltf_filepath + try: + bpy.app.timers.unregister(cleanup_file) + except:pass + bpy.app.timers.register(cleanup_file, first_interval=2) + + # get the parameters + scene = bpy.context.scene + if "glTF2ExportSettings" in scene: + settings = scene["glTF2ExportSettings"] + gltf_export_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + # now write new settings + gltf_export_settings.clear() + + settings = dict(settings) + current_gltf_settings = generate_complete_settings_dict(settings, presets=ExportGLTF2_Base, ignore_list=["use_active_collection", "use_active_collection_with_nested", "use_active_scene", "use_selection", "will_save_settings", "gltf_export_id"], preset_defaults=False) + gltf_export_settings.write(json.dumps(current_gltf_settings)) + # now reset the original gltf_settings + if gltf_settings_backup != "": + scene["glTF2ExportSettings"] = json.loads(gltf_settings_backup) + else: + if "glTF2ExportSettings" in scene: + del scene["glTF2ExportSettings"] + tracker.gltf_settings_backup = "" + + # the absurd length one has to go through to RESET THE OPERATOR because it has global state !!!!! AAAAAHHH + last_operator = tracker.last_operator + last_operator.filepath = "" + last_operator.gltf_export_id = "" \ No newline at end of file diff --git a/tools/bevy_components/registry/__init__.py b/tools/blenvy/add_ons/auto_export/blueprints/__init__.py similarity index 100% rename from tools/bevy_components/registry/__init__.py rename to tools/blenvy/add_ons/auto_export/blueprints/__init__.py diff --git a/tools/blenvy/add_ons/auto_export/blueprints/export_blueprints.py b/tools/blenvy/add_ons/auto_export/blueprints/export_blueprints.py new file mode 100644 index 0000000..53e3920 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/blueprints/export_blueprints.py @@ -0,0 +1,51 @@ +import os +import bpy +from blenvy.assets.assets_scan import get_blueprint_asset_tree +from blenvy.assets.generate_asset_file import write_ron_assets_file +from ..constants import TEMPSCENE_PREFIX +from ..common.generate_temporary_scene_and_export import generate_temporary_scene_and_export, copy_hollowed_collection_into, clear_hollow_scene +from ..common.export_gltf import generate_gltf_export_settings +from ..utils import upsert_blueprint_assets + +def export_blueprints(blueprints, settings, blueprints_data): + blueprints_path_full = getattr(settings, "blueprints_path_full") + gltf_export_settings = generate_gltf_export_settings(settings) + export_materials_library = getattr(settings.auto_export, "export_materials_library") + + try: + # save current active collection + active_collection = bpy.context.view_layer.active_layer_collection + + for blueprint in blueprints: + print("exporting collection", blueprint.name) + gltf_output_path = os.path.join(blueprints_path_full, blueprint.name) # TODO: reuse the export_path custom property ? + gltf_export_settings = { **gltf_export_settings, 'use_active_scene': True, 'use_active_collection': True, 'use_active_collection_with_nested':True} + + collection = bpy.data.collections[blueprint.name] + # if we are using the material library option, do not export materials, use placeholder instead + if export_materials_library: + gltf_export_settings['export_materials'] = 'PLACEHOLDER' + + upsert_blueprint_assets(blueprint, blueprints_data=blueprints_data, settings=settings) + + # do the actual export + generate_temporary_scene_and_export( + settings, + temp_scene_name=TEMPSCENE_PREFIX+collection.name, + additional_data = collection, + gltf_export_settings=gltf_export_settings, + gltf_output_path=gltf_output_path, + tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(collection, temp_collection, blueprints_data=blueprints_data, settings=settings), + tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=collection, temp_scene=temp_scene, **params) + ) + + #blueprint_asset_tree = get_blueprint_asset_tree(blueprint=blueprint, blueprints_data=blueprints_data, settings=settings) + #write_ron_assets_file(blueprint.name, blueprint_asset_tree, output_path_full = blueprints_path_full) + + # reset active collection to the one we save before + bpy.context.view_layer.active_layer_collection = active_collection + + except Exception as error: + print("failed to export collections to gltf: ", error) + raise error + diff --git a/tools/blenvy/add_ons/auto_export/blueprints/get_blueprints_to_export.py b/tools/blenvy/add_ons/auto_export/blueprints/get_blueprints_to_export.py new file mode 100644 index 0000000..5489e4f --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/blueprints/get_blueprints_to_export.py @@ -0,0 +1,64 @@ + +from blenvy.blueprints.blueprint_helpers import find_blueprints_not_on_disk + + +def is_blueprint_always_export(blueprint): + return blueprint.collection['always_export'] if 'always_export' in blueprint.collection else False + +# this also takes the split/embed mode into account: if a nested collection changes AND embed is active, its container collection should also be exported +def get_blueprints_to_export(changes_per_scene, changes_per_collection, changed_export_parameters, blueprints_data, settings): + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + blueprints_path_full = getattr(settings,"blueprints_path_full", "") + change_detection = getattr(settings.auto_export, "change_detection") + collection_instances_combine_mode = getattr(settings.auto_export, "collection_instances_combine_mode") + + internal_blueprints = blueprints_data.internal_blueprints + blueprints_to_export = internal_blueprints # just for clarity + + # print("change_detection", change_detection, "changed_export_parameters", changed_export_parameters, "changes_per_scene", changes_per_scene) + + # if the export parameters have changed, bail out early + # we need to re_export everything if the export parameters have been changed + if change_detection and not changed_export_parameters: + changed_blueprints = [] + + # first check if all collections have already been exported before (if this is the first time the exporter is run + # in your current Blender session for example) + blueprints_not_on_disk = find_blueprints_not_on_disk(internal_blueprints, blueprints_path_full, export_gltf_extension) + + for scene in settings.library_scenes: + if scene.name in changes_per_scene: + changed_objects = list(changes_per_scene[scene.name].keys()) + changed_blueprints = [blueprints_data.blueprints_from_objects[changed] for changed in changed_objects if changed in blueprints_data.blueprints_from_objects] + # we only care about local blueprints/collections + changed_local_blueprints = [blueprint for blueprint in changed_blueprints if blueprint.name in blueprints_data.blueprints_per_name.keys() and blueprint.local] + # FIXME: double check this: why are we combining these two ? + changed_blueprints += changed_local_blueprints + + # also deal with blueprints that are always marked as "always_export" + blueprints_always_export = [blueprint for blueprint in internal_blueprints if is_blueprint_always_export(blueprint)] + changed_blueprints_based_on_changed_collections = [blueprint for blueprint in internal_blueprints if blueprint.collection in changes_per_collection.values()] + + blueprints_to_export = list(set(changed_blueprints + blueprints_not_on_disk + blueprints_always_export + changed_blueprints_based_on_changed_collections)) + + + # filter out blueprints that are not marked & deal with the different combine modes + # we check for blueprint & object specific overrides ... + filtered_blueprints = [] + for blueprint in blueprints_to_export: + if blueprint.marked: + filtered_blueprints.append(blueprint) + else: + blueprint_instances = blueprints_data.internal_collection_instances.get(blueprint.name, []) + # print("INSTANCES", blueprint_instances, blueprints_data.internal_collection_instances) + # marked blueprints that have changed are always exported, regardless of whether they are in use (have instances) or not + for blueprint_instance in blueprint_instances: + combine_mode = blueprint_instance['_combine'] if '_combine' in blueprint_instance else collection_instances_combine_mode + if combine_mode == "Split": # we only keep changed blueprints if mode is set to split for at least one instance (aka if ALL instances of a blueprint are merged, do not export ? ) + filtered_blueprints.append(blueprint) + + blueprints_to_export = list(set(filtered_blueprints)) + + + # changed/all blueprints to export + return (blueprints_to_export) \ No newline at end of file diff --git a/tools/bevy_components/tests/__init__.py b/tools/blenvy/add_ons/auto_export/common/__init__.py similarity index 100% rename from tools/bevy_components/tests/__init__.py rename to tools/blenvy/add_ons/auto_export/common/__init__.py diff --git a/tools/blenvy/add_ons/auto_export/common/auto_export.py b/tools/blenvy/add_ons/auto_export/common/auto_export.py new file mode 100644 index 0000000..ea92bb7 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/auto_export.py @@ -0,0 +1,143 @@ + +import os +import bpy +import traceback + +from blenvy.blueprints.blueprints_scan import blueprints_scan +from blenvy.blueprints.blueprint_helpers import inject_export_path_into_internal_blueprints + +from ..blueprints.get_blueprints_to_export import get_blueprints_to_export +from ..levels.get_levels_to_export import get_levels_to_export +from .export_gltf import get_standard_exporter_settings + +from ..levels.export_levels import export_level_scene +from ..blueprints.export_blueprints import export_blueprints +from .export_materials import cleanup_materials, export_materials +from ..levels.bevy_scene_components import remove_scene_components, upsert_scene_components + + +"""this is the main 'central' function for all auto export """ +def auto_export(changes_per_scene, changes_per_collection, changes_per_material, changed_export_parameters, settings): + # have the export parameters (not auto export, just gltf export) have changed: if yes (for example switch from glb to gltf, compression or not, animations or not etc), we need to re-export everything + print ("changed_export_parameters", changed_export_parameters) + try: + #should we use change detection or not + change_detection = getattr(settings.auto_export, "change_detection") + export_scene_settings = getattr(settings.auto_export, "export_scene_settings") + do_export_blueprints = getattr(settings.auto_export, "export_blueprints") + export_materials_library = getattr(settings.auto_export, "export_materials_library") + + # standard gltf export settings are stored differently + standard_gltf_exporter_settings = get_standard_exporter_settings() + gltf_extension = standard_gltf_exporter_settings.get("export_format", 'GLB') + gltf_extension = '.glb' if gltf_extension == 'GLB' else '.gltf' + settings.export_gltf_extension = gltf_extension + + blueprints_data = bpy.context.window_manager.blueprints_registry.refresh_blueprints() + #blueprints_data = bpy.context.window_manager.blueprints_registry.blueprints_data + #print("blueprints_data", blueprints_data) + blueprints_per_scene = blueprints_data.blueprints_per_scenes + internal_blueprints = [blueprint.name for blueprint in blueprints_data.internal_blueprints] + external_blueprints = [blueprint.name for blueprint in blueprints_data.external_blueprints] + + # we inject the blueprints export path + blueprints_path = getattr(settings,"blueprints_path") + # inject the "export_path" and "material_path" properties into the internal blueprints + inject_export_path_into_internal_blueprints(internal_blueprints=blueprints_data.internal_blueprints, blueprints_path=blueprints_path, gltf_extension=gltf_extension, settings=settings) + + + for blueprint in blueprints_data.blueprints: + bpy.context.window_manager.blueprints_registry.add_blueprint(blueprint) + #bpy.context.window_manager.blueprints_registry.refresh_blueprints() + + if export_scene_settings: + # inject/ update scene components + upsert_scene_components(settings.level_scenes) + #inject/ update light shadow information + for light in bpy.data.lights: + enabled = 'true' if light.use_shadow else 'false' + # TODO: directly set relevant components instead ? + light['BlenderLightShadows'] = f"(enabled: {enabled}, buffer_bias: {light.shadow_buffer_bias})" + + # export + if do_export_blueprints: + print("EXPORTING") + # get blueprints/collections infos + (blueprints_to_export) = get_blueprints_to_export(changes_per_scene, changes_per_collection, changed_export_parameters, blueprints_data, settings) + + # get level scenes infos + (level_scenes_to_export) = get_levels_to_export(changes_per_scene, changes_per_collection, changed_export_parameters, blueprints_data, settings) + + # since materials export adds components we need to call this before blueprints are exported + # export materials & inject materials components into relevant objects + # FIXME: improve change detection, perhaps even add "material changes" + if export_materials_library and (changed_export_parameters or len(changes_per_material.keys()) > 0 ): + export_materials(blueprints_data.blueprint_names, settings.library_scenes, settings) + + # update the list of tracked exports + exports_total = len(blueprints_to_export) + len(level_scenes_to_export) + (1 if export_materials_library else 0) + bpy.context.window_manager.auto_export_tracker.exports_total = exports_total + bpy.context.window_manager.auto_export_tracker.exports_count = exports_total + + """bpy.context.window_manager.exportedCollections.clear() + for blueprint in blueprints_to_export: + bla = bpy.context.window_manager.exportedCollections.add() + bla.name = blueprint.name""" + print("-------------------------------") + #print("collections: all:", collections) + #print("collections: not found on disk:", collections_not_on_disk) + print("BLUEPRINTS: local/internal:", internal_blueprints) + print("BLUEPRINTS: external:", external_blueprints) + print("BLUEPRINTS: per_scene:", blueprints_per_scene) + print("-------------------------------") + print("BLUEPRINTS: to export:", [blueprint.name for blueprint in blueprints_to_export]) + print("-------------------------------") + print("MAIN SCENES: to export:", level_scenes_to_export) + print("-------------------------------") + # backup current active scene + old_current_scene = bpy.context.scene + # backup current selections + old_selections = bpy.context.selected_objects + + # first export any level/world scenes + if len(level_scenes_to_export) > 0: + print("export MAIN scenes") + for scene_name in level_scenes_to_export: + print(" exporting scene:", scene_name) + export_level_scene(bpy.data.scenes[scene_name], settings, blueprints_data) + + # now deal with blueprints/collections + do_export_library_scene = not change_detection or changed_export_parameters or len(blueprints_to_export) > 0 + if do_export_library_scene: + print("export LIBRARY") + export_blueprints(blueprints_to_export, settings, blueprints_data) + + # reset current scene from backup + bpy.context.window.scene = old_current_scene + + # reset selections + for obj in old_selections: + obj.select_set(True) + if export_materials_library: + cleanup_materials(blueprints_data.blueprint_names, settings.library_scenes) + + else: + for scene in settings.level_scenes: + export_level_scene(scene, settings, []) + + + + except Exception as error: + print(traceback.format_exc()) + + def error_message(self, context): + self.layout.label(text="Failure during auto_export: Error: "+ str(error)) + + bpy.context.window_manager.popup_menu(error_message, title="Error", icon='ERROR') + + finally: + # FIXME: error handling ? also redundant + if export_scene_settings: + # inject/ update scene components + remove_scene_components(settings.level_scenes) + diff --git a/tools/blenvy/add_ons/auto_export/common/duplicate_object.py b/tools/blenvy/add_ons/auto_export/common/duplicate_object.py new file mode 100644 index 0000000..7157118 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/duplicate_object.py @@ -0,0 +1,130 @@ +import json +import bpy +from blenvy.core.object_makers import (make_empty) +from blenvy.add_ons.bevy_components.utils import is_component_valid_and_enabled +from ..constants import custom_properties_to_filter_out + +def remove_unwanted_custom_properties(object): + to_remove = [] + component_names = list(object.keys()) # to avoid 'IDPropertyGroup changed size during iteration' issues + for component_name in component_names: + if not is_component_valid_and_enabled(object, component_name): + to_remove.append(component_name) + for cp in custom_properties_to_filter_out + to_remove: + if cp in object: + del object[cp] + +# TODO: rename actions ? +# reference https://github.com/KhronosGroup/glTF-Blender-IO/blob/main/addons/io_scene_gltf2/blender/exp/animation/gltf2_blender_gather_action.py#L481 +def copy_animation_data(source, target): + if source.animation_data: + ad = source.animation_data + + blender_actions = [] + blender_tracks = {} + + # TODO: this might need to be modified/ adapted to match the standard gltf exporter settings + for track in ad.nla_tracks: + non_muted_strips = [strip for strip in track.strips if strip.action is not None and strip.mute is False] + for strip in non_muted_strips: #t.strips: + # print(" ", source.name,'uses',strip.action.name, "active", strip.active, "action", strip.action) + blender_actions.append(strip.action) + blender_tracks[strip.action.name] = track.name + + # Remove duplicate actions. + blender_actions = list(set(blender_actions)) + # sort animations alphabetically (case insensitive) so they have a defined order and match Blender's Action list + blender_actions.sort(key = lambda a: a.name.lower()) + + markers_per_animation = {} + animations_infos = [] + + for action in blender_actions: + animation_name = blender_tracks[action.name] + animations_infos.append( + f'(name: "{animation_name}", frame_start: {action.frame_range[0]}, frame_end: {action.frame_range[1]}, frames_length: {action.frame_range[1] - action.frame_range[0]}, frame_start_override: {action.frame_start}, frame_end_override: {action.frame_end})' + ) + markers_per_animation[animation_name] = {} + + for marker in action.pose_markers: + if marker.frame not in markers_per_animation[animation_name]: + markers_per_animation[animation_name][marker.frame] = [] + markers_per_animation[animation_name][marker.frame].append(marker.name) + + # best method, using the built-in link animation operator + with bpy.context.temp_override(active_object=source, selected_editable_objects=[target]): + bpy.ops.object.make_links_data(type='ANIMATION') + + """if target.animation_data == None: + target.animation_data_create() + target.animation_data.action = source.animation_data.action.copy() + + print("copying animation data for", source.name, target.animation_data) + properties = [p.identifier for p in source.animation_data.bl_rna.properties if not p.is_readonly] + for prop in properties: + print("copying stuff", prop) + setattr(target.animation_data, prop, getattr(source.animation_data, prop))""" + + # we add an "AnimationInfos" component + target['AnimationInfos'] = f'(animations: {animations_infos})'.replace("'","") + + # and animation markers + markers_formated = '{' + for animation in markers_per_animation.keys(): + markers_formated += f'"{animation}":' + markers_formated += "{" + for frame in markers_per_animation[animation].keys(): + markers = markers_per_animation[animation][frame] + markers_formated += f"{frame}:{markers}, ".replace("'", '"') + markers_formated += '}, ' + markers_formated += '}' + target["AnimationMarkers"] = f'( {markers_formated} )' + +def duplicate_object(object, parent, combine_mode, destination_collection, blueprints_data, nester=""): + copy = None + internal_blueprint_names = [blueprint.name for blueprint in blueprints_data.internal_blueprints] + # print("COMBINE MODE", combine_mode) + if object.instance_type == 'COLLECTION' and (combine_mode == 'Split' or (combine_mode == 'EmbedExternal' and (object.instance_collection.name in internal_blueprint_names)) ): + #print("creating empty for", object.name, object.instance_collection.name, internal_blueprint_names, combine_mode) + original_collection = object.instance_collection + original_name = object.name + blueprint_name = original_collection.name + # FIXME: blueprint path is WRONG ! + # print("BLUEPRINT PATH", original_collection.get('export_path', None)) + blueprint_path = original_collection['export_path'] if 'export_path' in original_collection else f'./{blueprint_name}' # TODO: the default requires the currently used extension !! + + + object.name = original_name + "____bak" + empty_obj = make_empty(original_name, object.location, object.rotation_euler, object.scale, destination_collection) + + """we inject the collection/blueprint name & path, as a component called 'BlueprintInfo', but we only do this in the empty, not the original object""" + empty_obj['SpawnBlueprint'] = '()' + empty_obj['BlueprintInfo'] = f'(name: "{blueprint_name}", path: "{blueprint_path}")' + + # we copy custom properties over from our original object to our empty + for component_name, component_value in object.items(): + if component_name not in custom_properties_to_filter_out and is_component_valid_and_enabled(object, component_name): #copy only valid properties + empty_obj[component_name] = component_value + copy = empty_obj + else: + # for objects which are NOT collection instances or when embeding + # we create a copy of our object and its children, to leave the original one as it is + original_name = object.name + object.name = original_name + "____bak" + copy = object.copy() + copy.name = original_name + + destination_collection.objects.link(copy) + + # do this both for empty replacements & normal copies + if parent is not None: + copy.parent = parent + # without this, the copy"s offset from parent (if any ) will not be set correctly ! + # see here for example https://blender.stackexchange.com/questions/3763/parenting-messes-up-transforms-where-is-the-offset-stored + copy.matrix_parent_inverse = object.matrix_parent_inverse + + remove_unwanted_custom_properties(copy) + copy_animation_data(object, copy) + + for child in object.children: + duplicate_object(child, copy, combine_mode, destination_collection, blueprints_data, nester+" ") diff --git a/tools/blenvy/add_ons/auto_export/common/export_gltf.py b/tools/blenvy/add_ons/auto_export/common/export_gltf.py new file mode 100644 index 0000000..fc72ce0 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/export_gltf.py @@ -0,0 +1,85 @@ +import json +import os +import bpy + +from blenvy.settings import load_settings + +def get_standard_exporter_settings(): + standard_gltf_exporter_settings = load_settings(".blenvy_gltf_settings") + return standard_gltf_exporter_settings if standard_gltf_exporter_settings is not None else {} + +def generate_gltf_export_settings(settings): + # default values + gltf_export_settings = dict( + # export_format= 'GLB', #'GLB', 'GLTF_SEPARATE', 'GLTF_EMBEDDED' + check_existing=False, + + use_selection=False, + use_visible=True, # Export visible and hidden objects. See Object/Batch Export to skip. + use_renderable=False, + use_active_collection= False, + use_active_collection_with_nested=False, + use_active_scene = False, + + export_cameras=True, + export_extras=True, # For custom exported properties. + export_lights=True, + export_hierarchy_full_collections=False + + #export_texcoords=True, + #export_normals=True, + # here add draco settings + #export_draco_mesh_compression_enable = False, + + #export_tangents=False, + #export_materials + #export_colors=True, + #export_attributes=True, + #use_mesh_edges + #use_mesh_vertices + + + #export_yup=True, + #export_skins=True, + #export_morph=False, + #export_apply=False, + #export_animations=False, + #export_optimize_animation_size=False + ) + + """for key in settings.__annotations__.keys(): + if str(key) not in AutoExportGltfPreferenceNames: + #print("overriding setting", key, "value", getattr(settings,key)) + pass#gltf_export_settings[key] = getattr(settings, key)""" + + + standard_gltf_exporter_settings = get_standard_exporter_settings() + + # these essential params should NEVER be overwritten , no matter the settings of the standard exporter + constant_keys = [ + 'use_selection', + 'use_visible', + 'use_active_collection', + 'use_active_collection_with_nested', + 'use_active_scene', + 'export_cameras', + 'export_extras', # For custom exported properties. + 'export_lights', + 'export_hierarchy_full_collections' + ] + + # + for key in standard_gltf_exporter_settings.keys(): + if str(key) not in constant_keys: + gltf_export_settings[key] = standard_gltf_exporter_settings.get(key) + + print("GLTF EXPORT SETTINGS", gltf_export_settings) + return gltf_export_settings + + +#https://docs.blender.org/api/current/bpy.ops.export_scene.html#bpy.ops.export_scene.gltf +def export_gltf (path, gltf_export_settings): + settings = {**gltf_export_settings, "filepath": path} + # print("export settings",settings) + os.makedirs(os.path.dirname(path), exist_ok=True) + bpy.ops.export_scene.gltf(**settings) diff --git a/tools/gltf_auto_export/modules/export_materials.py b/tools/blenvy/add_ons/auto_export/common/export_materials.py similarity index 59% rename from tools/gltf_auto_export/modules/export_materials.py rename to tools/blenvy/add_ons/auto_export/common/export_materials.py index cdde179..2577e00 100644 --- a/tools/gltf_auto_export/modules/export_materials.py +++ b/tools/blenvy/add_ons/auto_export/common/export_materials.py @@ -2,27 +2,17 @@ import os import bpy from pathlib import Path -from ..helpers.generate_and_export import generate_and_export +from blenvy.core.helpers_collections import (traverse_tree) +from blenvy.core.object_makers import make_cube +from blenvy.materials.materials_helpers import add_material_info_to_objects, get_all_materials +from .generate_temporary_scene_and_export import generate_temporary_scene_and_export +from .export_gltf import (generate_gltf_export_settings) -from ..helpers.helpers_collections import (set_active_collection, traverse_tree) -from ..auto_export.export_gltf import (export_gltf, generate_gltf_export_preferences) -from ..helpers.object_makers import make_cube - -# get materials per object, and injects the materialInfo component -def get_materials(object): - material_slots = object.material_slots - used_materials_names = [] - #materials_per_object = {} - current_project_name = Path(bpy.context.blend_data.filepath).stem - - for m in material_slots: - material = m.material - # print(" slot", m, "material", material) - used_materials_names.append(material.name) - # TODO:, also respect slots & export multiple materials if applicable ! - object['MaterialInfo'] = '(name: "'+material.name+'", source: "'+current_project_name + '")' - - return used_materials_names +# material library logic +# To avoid redundant materials (can be very costly, mostly when using high res textures) +# - we explore a gltf file containing all materials from a blend file +# - we add materialInfo component to each object that uses one of the materials, so that "what material is used by which object" is preserved +# def clear_material_info(collection_names, library_scenes): for scene in library_scenes: @@ -33,21 +23,6 @@ def clear_material_info(collection_names, library_scenes): if 'MaterialInfo' in dict(object): # FIXME: hasattr does not work ???? del object["MaterialInfo"] - -def get_all_materials(collection_names, library_scenes): - #print("collecton", layerColl, "otot", layerColl.all_objects) #all_objects - used_material_names = [] - for scene in library_scenes: - root_collection = scene.collection - for cur_collection in traverse_tree(root_collection): - if cur_collection.name in collection_names: - for object in cur_collection.all_objects: - used_material_names = used_material_names + get_materials(object) - # we only want unique names - used_material_names = list(set(used_material_names)) - return used_material_names - - # creates a new object with the applied material, for the material library def make_material_object(name, location=[0,0,0], rotation=[0,0,0], scale=[1,1,1], material=None, collection=None): #original_active_object = bpy.context.active_object @@ -60,8 +35,6 @@ def make_material_object(name, location=[0,0,0], rotation=[0,0,0], scale=[1,1,1] else: # no slots object.data.materials.append(material) - - #bpy.context.view_layer.objects.active = original_active_object return object @@ -92,14 +65,14 @@ def clear_materials_scene(temp_scene): # exports the materials used inside the current project: # the name of the output path is /_materials_library.gltf/glb -def export_materials(collections, library_scenes, folder_path, addon_prefs): - gltf_export_preferences = generate_gltf_export_preferences(addon_prefs) - export_materials_path = getattr(addon_prefs,"export_materials_path") +def export_materials(collections, library_scenes, settings): + gltf_export_settings = generate_gltf_export_settings(settings) + materials_path_full = getattr(settings,"materials_path_full") - used_material_names = get_all_materials(collections, library_scenes) - current_project_name = Path(bpy.context.blend_data.filepath).stem + (used_material_names, materials_per_object) = get_all_materials(collections, library_scenes) + add_material_info_to_objects(materials_per_object, settings) - export_settings = { **gltf_export_preferences, + gltf_export_settings = { **gltf_export_settings, 'use_active_scene': True, 'use_active_collection':True, 'use_active_collection_with_nested':True, @@ -107,14 +80,16 @@ def export_materials(collections, library_scenes, folder_path, addon_prefs): 'use_renderable': False, 'export_apply':True } - gltf_output_path = os.path.join(folder_path, export_materials_path, current_project_name + "_materials_library") + + current_project_name = Path(bpy.context.blend_data.filepath).stem + gltf_output_path = os.path.join(materials_path_full, current_project_name + "_materials") print(" exporting Materials to", gltf_output_path, ".gltf/glb") - generate_and_export( - addon_prefs, + generate_temporary_scene_and_export( + settings=settings, + gltf_export_settings=gltf_export_settings, temp_scene_name="__materials_scene", - export_settings=export_settings, gltf_output_path=gltf_output_path, tempScene_filler= lambda temp_collection: generate_materials_scene_content(temp_collection, used_material_names), tempScene_cleaner= lambda temp_scene, params: clear_materials_scene(temp_scene=temp_scene) diff --git a/tools/blenvy/add_ons/auto_export/common/generate_temporary_scene_and_export.py b/tools/blenvy/add_ons/auto_export/common/generate_temporary_scene_and_export.py new file mode 100644 index 0000000..191f2bb --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/generate_temporary_scene_and_export.py @@ -0,0 +1,134 @@ +import json +import bpy +from blenvy.core.helpers_collections import (set_active_collection) +from blenvy.core.object_makers import (make_empty) +from .duplicate_object import duplicate_object +from .export_gltf import export_gltf +from blenvy.core.scene_helpers import add_scene_property +from ..constants import custom_properties_to_filter_out +""" +generates a temporary scene, fills it with data, cleans up after itself + * named using temp_scene_name + * filled using the tempScene_filler + * written on disk to gltf_output_path, with the gltf export parameters in gltf_export_settings + * cleaned up using tempScene_cleaner + +""" +def generate_temporary_scene_and_export(settings, gltf_export_settings, gltf_output_path, temp_scene_name="__temp_scene", tempScene_filler=None, tempScene_cleaner=None, additional_data=None): + + temp_scene = bpy.data.scenes.new(name=temp_scene_name) + temp_root_collection = temp_scene.collection + + properties_black_list = custom_properties_to_filter_out + if additional_data is not None: # FIXME not a fan of having this here + for entry in dict(additional_data): + # we copy everything over except those on the black list + if entry not in properties_black_list: + print("entry in additional data", entry, "value", additional_data[entry], "in", additional_data.name) + temp_scene[entry] = additional_data[entry] + + # save active scene + active_scene = bpy.context.window.scene + # and selected collection + active_collection = bpy.context.view_layer.active_layer_collection + # and mode + active_mode = bpy.context.active_object.mode if bpy.context.active_object is not None else None + # we change the mode to object mode, otherwise the gltf exporter is not happy + if active_mode is not None and active_mode != 'OBJECT': + print("setting to object mode", active_mode) + bpy.ops.object.mode_set(mode='OBJECT') + # we set our active scene to be this one : this is needed otherwise the stand-in empties get generated in the wrong scene + bpy.context.window.scene = temp_scene + + area = [area for area in bpy.context.screen.areas if area.type == "VIEW_3D"][0] + region = [region for region in area.regions if region.type == 'WINDOW'][0] + with bpy.context.temp_override(scene=temp_scene, area=area, region=region): + # detect scene mistmatch + scene_mismatch = bpy.context.scene.name != bpy.context.window.scene.name + if scene_mismatch: + raise Exception("Context scene mismatch, aborting", bpy.context.scene.name, bpy.context.window.scene.name) + + set_active_collection(bpy.context.scene, temp_root_collection.name) + # generate contents of temporary scene + scene_filler_data = tempScene_filler(temp_root_collection) + # export the temporary scene + try: + print("dry_run MODE", settings.auto_export.dry_run) + if settings.auto_export.dry_run == "DISABLED": + export_gltf(gltf_output_path, gltf_export_settings) + except Exception as error: + print("failed to export gltf !", error) + raise error + # restore everything + tempScene_cleaner(temp_scene, scene_filler_data) + + # reset active scene + bpy.context.window.scene = active_scene + # reset active collection + bpy.context.view_layer.active_layer_collection = active_collection + # reset mode + if active_mode is not None: + bpy.ops.object.mode_set( mode = active_mode ) + + + +# copies the contents of a collection into another one while replacing library instances with empties +def copy_hollowed_collection_into(source_collection, destination_collection, parent_empty=None, filter=None, blueprints_data=None, settings={}): + collection_instances_combine_mode = getattr(settings.auto_export, "collection_instances_combine_mode") + for object in source_collection.objects: + if object.name.endswith("____bak"): # some objects could already have been handled, ignore them + continue + if filter is not None and filter(object) is False: + continue + #check if a specific collection instance does not have an ovveride for combine_mode + combine_mode = object['_combine'] if '_combine' in object else collection_instances_combine_mode + parent = parent_empty + duplicate_object(object, parent, combine_mode, destination_collection, blueprints_data) + + # for every child-collection of the source, copy its content into a new sub-collection of the destination + for collection in source_collection.children: + original_name = collection.name + collection.name = original_name + "____bak" + collection_placeholder = make_empty(original_name, [0,0,0], [0,0,0], [1,1,1], destination_collection) + + if parent_empty is not None: + collection_placeholder.parent = parent_empty + copy_hollowed_collection_into( + source_collection = collection, + destination_collection = destination_collection, + parent_empty = collection_placeholder, + filter = filter, + blueprints_data = blueprints_data, + settings=settings + ) + return {} + + +# clear & remove "hollow scene" +def clear_hollow_scene(temp_scene, original_root_collection): + def restore_original_names(collection): + if collection.name.endswith("____bak"): + collection.name = collection.name.replace("____bak", "") + for object in collection.all_objects: + """if object.instance_type == 'COLLECTION': + if object.name.endswith("____bak"): + object.name = object.name.replace("____bak", "") + else: """ + if object.name.endswith("____bak"): + object.name = object.name.replace("____bak", "") + for child_collection in collection.children: + restore_original_names(child_collection) + + + # remove any data we created + temp_root_collection = temp_scene.collection + temp_scene_objects = [o for o in temp_root_collection.all_objects] + for object in temp_scene_objects: + #print("removing", object.name) + bpy.data.objects.remove(object, do_unlink=True) + + # remove the temporary scene + bpy.data.scenes.remove(temp_scene, do_unlink=True) + + # reset original names + restore_original_names(original_root_collection) diff --git a/tools/blenvy/add_ons/auto_export/common/prepare_and_export.py b/tools/blenvy/add_ons/auto_export/common/prepare_and_export.py new file mode 100644 index 0000000..27d73d3 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/prepare_and_export.py @@ -0,0 +1,50 @@ +import bpy + +from .project_diff import get_changes_per_scene +from .auto_export import auto_export +from .settings_diff import get_setting_changes +from blenvy.settings import load_settings, upsert_settings + +# prepare export by gather the changes to the scenes & settings +def prepare_and_export(): + print("prepare and export") + #bpy.context.window_manager.auto_export_tracker.disable_change_detection() + blenvy = bpy.context.window_manager.blenvy + auto_export_settings = blenvy.auto_export + + # if there are no level or blueprint scenes, bail out early + if len(blenvy.level_scenes) == 0 and len(blenvy.library_scenes) == 0: + print("no level or library scenes, skipping auto export") + return + + if auto_export_settings.auto_export: # only do the actual exporting if auto export is actually enabled + # determine changed objects + per_scene_changes, per_collection_changes, per_material_changes, project_hash = get_changes_per_scene(settings=blenvy) + # determine changed parameters + setting_changes, current_common_settings, current_export_settings, current_gltf_settings = get_setting_changes() + print("changes: settings:", setting_changes) + print("changes: scenes:", per_scene_changes) + print("changes: collections:", per_collection_changes) + print("changes: materials:", per_material_changes) + + # do the actual export + # blenvy.auto_export.dry_run = 'NO_EXPORT'#'DISABLED'# + auto_export(per_scene_changes, per_collection_changes, per_material_changes, setting_changes, blenvy) + + # ------------------------------------- + # now that this point is reached, the export should have run correctly, so we can save all the current state to the "previous one" + for scene in bpy.data.scenes: + blenvy.scenes_to_scene_names[scene] = scene.name + print("bla", blenvy.scenes_to_scene_names, "hash", project_hash) + # save the current project hash as previous + upsert_settings(".blenvy.project_serialized_previous", project_hash, overwrite=True) + # write the new settings to the old settings + upsert_settings(".blenvy_common_settings_previous", current_common_settings, overwrite=True) + upsert_settings(".blenvy_export_settings_previous", current_export_settings, overwrite=True) + upsert_settings(".blenvy_gltf_settings_previous", current_gltf_settings, overwrite=True) + + # cleanup + # TODO: these are likely obsolete + # reset the list of changes in the tracker + #bpy.context.window_manager.auto_export_tracker.clear_changes() + print("AUTO EXPORT DONE") diff --git a/tools/blenvy/add_ons/auto_export/common/project_diff.py b/tools/blenvy/add_ons/auto_export/common/project_diff.py new file mode 100644 index 0000000..bdd8176 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/project_diff.py @@ -0,0 +1,165 @@ +import json +import traceback +import bpy +from .serialize_project import serialize_project +from blenvy.settings import load_settings, upsert_settings + +def bubble_up_changes(object, changes_per_scene): + if object is not None and object.parent: + changes_per_scene[object.parent.name] = bpy.data.objects[object.parent.name] + bubble_up_changes(object.parent, changes_per_scene) + +import uuid +def serialize_current(settings): + # sigh... you need to save & reset the frame otherwise it saves the values AT THE CURRENT FRAME WHICH CAN DIFFER ACROSS SCENES + current_frames = [scene.frame_current for scene in bpy.data.scenes] + for scene in bpy.data.scenes: + scene.frame_set(0) + if scene.id_test == '': + print("GENERATE ID") + scene.id_test = str(uuid.uuid4()) + print("SCENE ID", scene.id_test) + #https://blender.stackexchange.com/questions/216411/whats-the-replacement-for-id-or-hash-on-bpy-objects + + current_scene = bpy.context.window.scene + bpy.context.window.scene = bpy.data.scenes[0] + #serialize scene at frame 0 + # TODO: add back + """with bpy.context.temp_override(scene=bpy.data.scenes[1]): + bpy.context.scene.frame_set(0)""" + + current = serialize_project(settings) + bpy.context.window.scene = current_scene + + # reset previous frames + for (index, scene) in enumerate(bpy.data.scenes): + scene.frame_set(int(current_frames[index])) + + return current + +def get_changes_per_scene(settings): + previous = load_settings(".blenvy.project_serialized_previous") + current = serialize_current(settings) + + # so in Blender, there is no uuid per object, hash changes on undo redo, adress/pointer to object may change at any undo / redo without possible way of knowing when + # so... ugh + scenes_to_scene_names = {} + for scene in bpy.data.scenes: + scenes_to_scene_names[scene] = scene.name + print("cur scenes_to_scene_names", scenes_to_scene_names) + print("pre fpp", settings.scenes_to_scene_names) + + scene_renames = {} + for scene in settings.scenes_to_scene_names: + if scene in scenes_to_scene_names: + previous_name_of_scene = settings.scenes_to_scene_names[scene] + current_name_of_scene = scenes_to_scene_names[scene] + if previous_name_of_scene != current_name_of_scene: + scene_renames[current_name_of_scene] = previous_name_of_scene + print("SCENE RENAMED !previous", previous_name_of_scene, "current", current_name_of_scene) + print("scene new name to old name", scene_renames) + + # determine changes + changes_per_scene = {} + changes_per_collection = {} + changes_per_material = {} + try: + (changes_per_scene, changes_per_collection, changes_per_material) = project_diff(previous, current, scene_renames, settings) + except Exception as error: + print(traceback.format_exc()) + print("failed to compare current serialized scenes to previous ones: Error:", error) + + return changes_per_scene, changes_per_collection, changes_per_material, current + + +def project_diff(previous, current, scene_renames, settings): + """print("previous", previous) + print("current", current)""" + if previous is None or current is None: + return {} + + changes_per_scene = {} + changes_per_collection = {} + changes_per_material = {} + + # possible ? on each save, inject an id into each scene, that cannot be copied over + current_scenes = current["scenes"] + previous_scenes = previous["scenes"] + + print("previous scenes", previous_scenes.keys()) + print("current scenes", current_scenes.keys()) + print("new names to old names", scene_renames) + print("") + for scene_name in current_scenes: + print("scene name", scene_name, scene_name in scene_renames) + current_scene = current_scenes[scene_name] + previous_scene = previous_scenes[scene_name] if not scene_name in scene_renames else previous_scenes[scene_renames[scene_name]] + current_object_names =list(current_scene.keys()) + + updated_scene_name = scene_name if not scene_name in scene_renames else scene_renames[scene_name] + if updated_scene_name in previous_scenes: # we can only compare scenes that are in both previous and current data, with the above we also account for renames + + previous_object_names = list(previous_scene.keys()) + added = list(set(current_object_names) - set(previous_object_names)) + removed = list(set(previous_object_names) - set(current_object_names)) + + for obj in added: + if not scene_name in changes_per_scene: + changes_per_scene[scene_name] = {} + changes_per_scene[scene_name][obj] = bpy.data.objects[obj] if obj in bpy.data.objects else None + + # TODO: how do we deal with this, as we obviously do not have data for removed objects ? + for obj in removed: + if not scene_name in changes_per_scene: + changes_per_scene[scene_name] = {} + changes_per_scene[scene_name][obj] = None + + for object_name in list(current_scene.keys()): # TODO : exclude directly added/removed objects + if object_name in previous_scene: + current_obj = current_scene[object_name] + prev_obj = previous_scene[object_name] + same = str(current_obj) == str(prev_obj) + + if not same: + if not scene_name in changes_per_scene: + changes_per_scene[scene_name] = {} + + target_object = bpy.data.objects[object_name] if object_name in bpy.data.objects else None + changes_per_scene[scene_name][object_name] = target_object + bubble_up_changes(target_object, changes_per_scene[scene_name]) + # now bubble up for instances & parents + else: + print(f"scene {scene_name} not present in previous data") + + + + current_collections = current["collections"] + previous_collections = previous["collections"] + + for collection_name in current_collections: + if collection_name in previous_collections: + current_collection = current_collections[collection_name] + prev_collection = previous_collections[collection_name] + same = str(current_collection) == str(prev_collection) + + if not same: + #if not collection_name in changes_per_collection: + target_collection = bpy.data.collections[collection_name] if collection_name in bpy.data.collections else None + changes_per_collection[collection_name] = target_collection + + # process changes to materials + current_materials = current["materials"] + previous_materials = previous["materials"] + + for material_name in current_materials: + if material_name in previous_materials: + current_material = current_materials[material_name] + prev_material = previous_materials[material_name] + same = str(current_material) == str(prev_material) + + if not same: + #if not material_name in changes_per_material: + target_material = bpy.data.materials[material_name] if material_name in bpy.data.materials else None + changes_per_material[material_name] = target_material + + return (changes_per_scene, changes_per_collection, changes_per_material) \ No newline at end of file diff --git a/tools/blenvy/add_ons/auto_export/common/serialize_project.py b/tools/blenvy/add_ons/auto_export/common/serialize_project.py new file mode 100644 index 0000000..dc626ce --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/serialize_project.py @@ -0,0 +1,416 @@ +import collections +import collections.abc +import inspect +import json +from mathutils import Color +import numpy as np +import bpy +from ..constants import TEMPSCENE_PREFIX + +import hashlib + +# horrible and uneficient +def h1_hash(w): + try: + w = w.encode('utf-8') + except: pass + return hashlib.md5(w).hexdigest() + +fields_to_ignore_generic = [ + "tag", "type", "update_tag", "use_extra_user", "use_fake_user", "user_clear", "user_of_id", "user_remap", "users", + 'animation_data_clear', 'animation_data_create', 'asset_clear', 'asset_data', 'asset_generate_preview', 'asset_mark', 'bl_rna', 'evaluated_get', + 'library', 'library_weak_reference', 'make_local','name', 'name_full', 'original', + 'override_create', 'override_hierarchy_create', 'override_library', 'preview', 'preview_ensure', 'rna_type', + 'session_uid', 'copy', 'id_type', 'is_embedded_data', 'is_evaluated', 'is_library_indirect', 'is_missing', 'is_runtime_data', + + 'components_meta', 'cycles' +] + + +def generic_fields_hasher(data, fields_to_ignore): + all_field_names = dir(data) + field_values = [getattr(data, prop, None) for prop in all_field_names if not prop.startswith("__") and not prop in fields_to_ignore and not prop.startswith("show") and not callable(getattr(data, prop, None)) ] + return str(field_values) + +def peel_value( value ): + try: + len( value ) + return [ peel_value( x ) for x in value ] + except TypeError: + return value + +def _lookup_color(data): + return peel_value(data) + +def _lookup_array(data): + return peel_value(data) + +def _lookup_array2(data): + print("mystery vectors") + return peel_value(data) + +def _lookup_prop_group(data): + return generic_fields_hasher_evolved(data, fields_to_ignore=fields_to_ignore_generic) + +def _lookup_collection(data): + return [generic_fields_hasher_evolved(item, fields_to_ignore=fields_to_ignore_generic) for item in data] + +def _lookup_materialLineArt(data): + return generic_fields_hasher_evolved(data, fields_to_ignore=fields_to_ignore_generic) + +def _lookup_object(data): + return data.name + return generic_fields_hasher_evolved(data, fields_to_ignore=fields_to_ignore_generic) + +def _lookup_generic(data): + return generic_fields_hasher_evolved(data, fields_to_ignore=fields_to_ignore_generic) + +# used for various node trees: shaders, modifiers etc +def node_tree(node_tree): + #print("SCANNING NODE TREE", node_tree) + + # storage for hashing + links_hashes = [] + nodes_hashes = [] + root_inputs = dict(node_tree) # probably useless for materials, contains settings for certain modifiers + + for node in node_tree.nodes: + #print("node", node, node.type, node.name, node.label) + + input_hashes = [] + for input in node.inputs: + #print(" input", input, "label", input.label, "name", input.name, dir(input)) + default_value = getattr(input, 'default_value', None) + input_hash = f"{convert_field(default_value)}" + input_hashes.append(input_hash) + + output_hashes = [] + # IF the node itself is a group input, its outputs are the inputs of the geometry node (yes, not easy) + node_in_use = True + for (index, output) in enumerate(node.outputs): + # print(" output", output, "label", output.label, "name", output.name, "generated name", f"Socket_{index+1}") + default_value = getattr(output, 'default_value', None) + output_hash = f"{convert_field(default_value)}" + output_hashes.append(output_hash) + + node_in_use = node_in_use and default_value is not None + #print("NODE IN USE", node_in_use) + + node_fields_to_ignore = fields_to_ignore_generic + ['internal_links', 'inputs', 'outputs'] + node_hash = f"{generic_fields_hasher_evolved(node, node_fields_to_ignore)}_{str(input_hashes)}_{str(output_hashes)}" + #print("node hash", node_hash) + #print("node hash", str(input_hashes)) + nodes_hashes.append(node_hash) + + for link in node_tree.links: + """print("LINK", link, dir(link)) + print("FROM", link.from_node, link.from_socket) + print("TO", link.to_node, link.to_socket)""" + + from_socket_default = link.from_socket.default_value if hasattr(link.from_socket, "default_value") else None + to_socket_default = link.to_socket.default_value if hasattr(link.to_socket, "default_value") else None + link_hash = f"{link.from_node.name}_{link.from_socket.name}_{from_socket_default}+{link.to_node.name}_{link.to_socket.name}_{to_socket_default}" + + links_hashes.append(link_hash) + + #print("node hashes",nodes_hashes, "links_hashes", links_hashes) + return f"{str(root_inputs)}_{str(nodes_hashes)}_{str(links_hashes)}" + + +type_lookups = { + Color: _lookup_color,#lambda input: print("dsf")', + bpy.types.Object: _lookup_object, + bpy.types.FloatVectorAttribute: _lookup_array2, + bpy.types.bpy_prop_array: _lookup_array, + bpy.types.PropertyGroup: _lookup_prop_group, + bpy.types.bpy_prop_collection: _lookup_collection, + bpy.types.MaterialLineArt: _lookup_materialLineArt, + bpy.types.NodeTree: node_tree, + bpy.types.CurveProfile: _lookup_generic, + bpy.types.RaytraceEEVEE: _lookup_generic, + bpy.types.CurveMapping: _lookup_generic, + bpy.types.MaterialGPencilStyle: _lookup_generic, +} + +def convert_field(raw_value, field_name="", scan_node_tree=True): + """# nodes are a special case: # TODO: find out their types & move these to type lookups + if field_name in ["node_tree", "node_group"] and scan_node_tree: + print("scan node tree", inspect.getmro(type(raw_value))) + return node_tree(raw_value) +""" + conversion_lookup = None # type_lookups.get(type(raw_value), None) + all_types = inspect.getmro(type(raw_value)) + for s_type in all_types: + #print(" stype", s_type) + if type_lookups.get(s_type, None) is not None: + conversion_lookup = type_lookups[s_type] + break + + field_value = None + if conversion_lookup is not None: + field_value = conversion_lookup(raw_value) + #print("field_name",field_name,"conv value", field_value) + else: + #print("field_name",field_name,"raw value", raw_value) + """try: + field_value=_lookup_generic(raw_value) + except:pass""" + field_value = raw_value + + return field_value + +# just a helper , for shorthand +def obj_to_dict(object): + try: + return dict(object) + except: + return {} + +# TODO: replace the first one with this once if its done +def generic_fields_hasher_evolved(data, fields_to_ignore, scan_node_tree=True): + dict_data = obj_to_dict(data) # in some cases, some data is in the key/value pairs of the object + dict_data = {key: dict_data[key] for key in dict_data.keys() if key not in fields_to_ignore}# we need to filter out fields here too + all_field_names = dir(data) + field_values = [] + for field_name in all_field_names: + if not field_name.startswith("__") and not field_name in fields_to_ignore and not field_name.startswith("show") and not callable(getattr(data, field_name, None)): + raw_value = getattr(data, field_name, None) + #print("raw value", raw_value, "type", type(raw_value), isinstance(raw_value, Color), isinstance(raw_value, bpy.types.bpy_prop_array)) + field_value = convert_field(raw_value, field_name, scan_node_tree) + #print("field name", field_name, "raw", raw_value, "converted", field_value) + + field_values.append(str(field_value)) + + return str(dict_data) + str(field_values) + +# possible alternatives https://blender.stackexchange.com/questions/286010/bpy-detect-modified-mesh-data-vertices-edges-loops-or-polygons-for-cachin +def mesh_hash(obj): + # this is incomplete, how about edges ? + vertex_count = len(obj.data.vertices) + vertices_np = np.empty(vertex_count * 3, dtype=np.float32) + obj.data.vertices.foreach_get("co", vertices_np) + h = str(h1_hash(vertices_np.tobytes())) + return h + +# TODO: redo this one, this is essentially modifiec copy & pasted data, not fitting +def animation_hash(obj): + animation_data = obj.animation_data + if not animation_data: + return None + blender_actions = [] + blender_tracks = {} + + # TODO: this might need to be modified/ adapted to match the standard gltf exporter settings + for track in animation_data.nla_tracks: + strips = [strip for strip in track.strips if strip.action is not None] + for strip in strips: + # print(" ", source.name,'uses',strip.action.name, "active", strip.active, "action", strip.action) + blender_actions.append(strip.action) + blender_tracks[strip.action.name] = track.name + + # Remove duplicate actions. + blender_actions = list(set(blender_actions)) + # sort animations alphabetically (case insensitive) so they have a defined order and match Blender's Action list + blender_actions.sort(key = lambda a: a.name.lower()) + + markers_per_animation = {} + animations_infos = [] + + for action in blender_actions: + animation_name = blender_tracks[action.name] + animations_infos.append( + f'(name: "{animation_name}", frame_start: {action.frame_range[0]}, frame_end: {action.frame_range[1]}, frames_length: {action.frame_range[1] - action.frame_range[0]}, frame_start_override: {action.frame_start}, frame_end_override: {action.frame_end})' + ) + markers_per_animation[animation_name] = {} + + for marker in action.pose_markers: + if marker.frame not in markers_per_animation[animation_name]: + markers_per_animation[animation_name][marker.frame] = [] + markers_per_animation[animation_name][marker.frame].append(marker.name) + + compact_result = h1_hash(str((blender_actions, blender_tracks, markers_per_animation, animations_infos))) + return compact_result + + +# TODO : we should also check for custom props on scenes, meshes, materials +# TODO: also how about our new "assets" custom properties ? those need to be check too +def custom_properties_hash(obj): + custom_properties = {} + for property_name in obj.keys(): + if property_name not in '_RNA_UI' and property_name != 'components_meta' and property_name != 'user_assets': + custom_properties[property_name] = obj[property_name] #generic_fields_hasher_evolved(data=obj[property_name],fields_to_ignore=fields_to_ignore_generic) + """if property_name == "user_assets": + print("tptp") + custom_properties[property_name] = generic_fields_hasher_evolved(data=obj[property_name],fields_to_ignore=fields_to_ignore_generic)""" + return str(h1_hash(str(custom_properties))) + +def camera_hash(obj): + camera_data = obj.data + # TODO: the above is not enough, certain fields are left as bpy.data.xx + return str(generic_fields_hasher(camera_data, fields_to_ignore_generic)) + +def light_hash(obj): + light_data = obj.data + return str(generic_fields_hasher(light_data, fields_to_ignore_generic)) + +def bones_hash(bones): + fields_to_ignore = fields_to_ignore_generic + ['AxisRollFromMatrix', 'MatrixFromAxisRoll', 'evaluate_envelope', 'convert_local_to_pose', 'foreach_get', 'foreach_set', 'get', 'set', 'find', 'items', 'keys', 'values'] + + bones_result = [] + for bone in bones: + all_field_names = dir(bone) + fields = [getattr(bone, prop, None) for prop in all_field_names if not prop.startswith("__") and not prop in fields_to_ignore and not prop.startswith("show_")] + bones_result.append(fields) + #print("fields of bone", bones_result) + return str(h1_hash(str(bones_result))) + +# fixme: not good enough ? +def armature_hash(obj): + fields_to_ignore = fields_to_ignore_generic + ['display_type', 'is_editmode', 'pose_position', 'foreach_get', 'get'] + fields_to_convert = {'bones': bones_hash}#, 'collections_all': bones_hash} + armature_data = obj.data + all_field_names = dir(armature_data) + + fields = [getattr(armature_data, prop, None) if not prop in fields_to_convert.keys() else fields_to_convert[prop](getattr(armature_data, prop)) for prop in all_field_names if not prop.startswith("__") and not prop in fields_to_ignore and not prop.startswith("show_")] + + """for bone in armature_data.bones: + print("bone", bone, bone_hash(bone))""" + return str(fields) + +def material_hash(material, cache, settings): + cached_hash = cache['materials'].get(material.name, None) + if cached_hash: + return cached_hash + else: + scan_node_tree = settings.auto_export.materials_in_depth_scan + #print("HASHING MATERIAL", material.name) + hashed_material = generic_fields_hasher_evolved(material, fields_to_ignore_generic, scan_node_tree=scan_node_tree) + #print("HASHED MATERIAL", hashed_material) + hashed_material = str(hashed_material) + cache['materials'][material.name] = hashed_material + return hashed_material + +# TODO: this is partially taken from export_materials utilities, perhaps we could avoid having to fetch things multiple times ? +def materials_hash(obj, cache, settings): + # print("materials") + materials = [] + for material_slot in obj.material_slots: + material = material_slot.material + mat = material_hash(material, cache, settings) + materials.append(mat) + + return str(h1_hash(str(materials))) + + +def modifier_hash(modifier_data, settings): + scan_node_tree = settings.auto_export.modifiers_in_depth_scan + #print("HASHING MODIFIER", modifier_data.name) + hashed_modifier = generic_fields_hasher_evolved(modifier_data, fields_to_ignore_generic, scan_node_tree=scan_node_tree) + #print("modifier", modifier_data.name, "hashed", hashed_modifier) + return str(hashed_modifier) + +def modifiers_hash(object, settings): + modifiers = [] + for modifier in object.modifiers: + #print("modifier", modifier )# modifier.node_group) + modifiers.append(modifier_hash(modifier, settings)) + #print(" ") + return str(h1_hash(str(modifiers))) + + +def serialize_project(settings): + cache = {"materials":{}} + print("serializing project") + + per_scene = {} + for scene in settings.level_scenes + settings.library_scenes: #bpy.data.scenes: + print("scene", scene.name) + # ignore temporary scenes + if scene.name.startswith(TEMPSCENE_PREFIX): + continue + per_scene[scene.name] = {} + + + custom_properties = custom_properties_hash(scene) if len(scene.keys()) > 0 else None + # render settings are injected into each scene + eevee_settings = generic_fields_hasher_evolved(scene.eevee, fields_to_ignore=fields_to_ignore_generic) # TODO: ignore most of the fields + view_settings = generic_fields_hasher_evolved(scene.view_settings, fields_to_ignore=fields_to_ignore_generic) + + scene_field_hashes = { + "custom_properties": custom_properties, + "eevee": eevee_settings, + "view_settings": view_settings, + } + #generic_fields_hasher_evolved(scene.eevee, fields_to_ignore=fields_to_ignore_generic) + # FIXME: how to deal with this cleanly + per_scene[scene.name]["____scene_settings"] = str(h1_hash(str(scene_field_hashes))) + + + for object in scene.objects: + object = bpy.data.objects[object.name] + #loc, rot, scale = bpy.context.object.matrix_world.decompose() + transform = str((object.location, object.rotation_euler, object.scale)) #str((object.matrix_world.to_translation(), object.matrix_world.to_euler('XYZ'), object.matrix_world.to_quaternion()))# + visibility = object.visible_get() + custom_properties = custom_properties_hash(object) if len(object.keys()) > 0 else None + animations = animation_hash(object) + mesh = mesh_hash(object) if object.type == 'MESH' else None + camera = camera_hash(object) if object.type == 'CAMERA' else None + light = light_hash(object) if object.type == 'LIGHT' else None + armature = armature_hash(object) if object.type == 'ARMATURE' else None + parent = object.parent.name if object.parent else None + collections = [collection.name for collection in object.users_collection] + materials = materials_hash(object, cache, settings) if len(object.material_slots) > 0 else None + modifiers = modifiers_hash(object, settings) if len(object.modifiers) > 0 else None + + object_field_hashes = { + "name": object.name, + "transforms": transform, + "visibility": visibility, + "custom_properties": custom_properties, + "animations": animations, + "mesh": mesh, + "camera": camera, + "light": light, + "armature": armature, + "parent": parent, + "collections": collections, + "materials": materials, + "modifiers":modifiers + } + + object_field_hashes_filtered = {key: object_field_hashes[key] for key in object_field_hashes.keys() if object_field_hashes[key] is not None} + objectHash = str(h1_hash(str(object_field_hashes_filtered))) + per_scene[scene.name][object.name] = objectHash + + per_collection = {} + # also hash collections (important to catch component changes per blueprints/collections) + # collections_in_scene = [collection for collection in bpy.data.collections if scene.user_of_id(collection)] + for collection in bpy.data.collections:# collections_in_scene: + #loc, rot, scale = bpy.context.object.matrix_world.decompose() + #visibility = collection.visible_get() + custom_properties = custom_properties_hash(collection) if len(collection.keys()) > 0 else None + # parent = collection.parent.name if collection.parent else None + #collections = [collection.name for collection in object.users_collection] + + collection_field_hashes = { + "name": collection.name, + # "visibility": visibility, + "custom_properties": custom_properties, + #"parent": parent, + #"collections": collections, + } + + collection_field_hashes_filtered = {key: collection_field_hashes[key] for key in collection_field_hashes.keys() if collection_field_hashes[key] is not None} + + collectionHash = str(h1_hash(str(collection_field_hashes_filtered))) + per_collection[collection.name] = collectionHash + + # and also hash materials to avoid constanstly exporting materials libraries, and only + # actually this should be similar to change detections for scenes + per_material = {} + for material in bpy.data.materials: + per_material[material.name] = str(h1_hash(material_hash(material, cache, settings))) + + return {"scenes": per_scene, "collections": per_collection, "materials": per_material} + + diff --git a/tools/blenvy/add_ons/auto_export/common/settings_diff.py b/tools/blenvy/add_ons/auto_export/common/settings_diff.py new file mode 100644 index 0000000..0f0f2e3 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/settings_diff.py @@ -0,0 +1,53 @@ +import bpy + +from blenvy.settings import are_settings_identical, load_settings, changed_settings + +# which common settings changes should trigger a re-export +parameter_names_whitelist_common = [ + # blenvy core + 'project_root_path', + 'assets_path', + 'blueprints_path', + 'levels_path', + 'materials_path', + 'level_scene_names', + 'library_scene_names', +] + +# which auto export settings changes should trigger a re-export +parameter_names_whitelist_auto_export = [ + # auto export + 'export_scene_settings', + 'export_blueprints', + 'export_separate_dynamic_and_static_objects', + 'export_materials_library', + 'collection_instances_combine_mode', +] + +def get_setting_changes(): + previous_common_settings = load_settings(".blenvy_common_settings_previous") + current_common_settings = load_settings(".blenvy_common_settings") + changed_common_settings_fields = changed_settings(previous_common_settings, current_common_settings, white_list=parameter_names_whitelist_common) + common_settings_changed = len(changed_common_settings_fields) > 0 + + previous_export_settings = load_settings(".blenvy_export_settings_previous") + current_export_settings = load_settings(".blenvy_export_settings") + changed_export_settings_fields = changed_settings(previous_export_settings, current_export_settings, white_list=parameter_names_whitelist_auto_export) + export_settings_changed = len(changed_export_settings_fields) > 0 + + previous_gltf_settings = load_settings(".blenvy_gltf_settings_previous") + current_gltf_settings = load_settings(".blenvy_gltf_settings") + gltf_settings_changed = not are_settings_identical(previous_gltf_settings, current_gltf_settings) + + settings_changed = common_settings_changed or gltf_settings_changed or export_settings_changed + + # if there were no setting before, it is new, we need export # TODO: do we even need this ? I guess in the case where both the previous & the new one are both none ? very unlikely, but still + if previous_common_settings is None: + settings_changed = True + if previous_export_settings is None: + settings_changed = True + if previous_gltf_settings is None: + settings_changed = True + + + return settings_changed, current_common_settings, current_export_settings, current_gltf_settings diff --git a/tools/blenvy/add_ons/auto_export/common/tracker.py b/tools/blenvy/add_ons/auto_export/common/tracker.py new file mode 100644 index 0000000..aa5cf20 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/common/tracker.py @@ -0,0 +1,201 @@ +import json +import bpy + +from bpy.types import (PropertyGroup) +from bpy.props import (PointerProperty, IntProperty, StringProperty) + +from .prepare_and_export import prepare_and_export + +from ..constants import TEMPSCENE_PREFIX + +class AutoExportTracker(PropertyGroup): + + changed_objects_per_scene = {} + change_detection_enabled = True + export_params_changed = False + + last_operator = None + + + dummy_file_path: StringProperty()# type: ignore + # special property for gltf settings + gltf_settings_backup: StringProperty( + name="gltf settings backup", + description="backup for existing gltf settings so that we can restore them" + ) # type: ignore + + + + + exports_total : IntProperty( + name='exports_total', + description='Number of total exports', + default=0 + ) # type: ignore + + exports_count : IntProperty( + name='exports_count', + description='Number of exports in progress', + default=0 + ) # type: ignore + + @classmethod + def register(cls): + bpy.types.WindowManager.auto_export_tracker = PointerProperty(type=AutoExportTracker) + + bpy.types.Scene.id_test = StringProperty(default="") + + # setup handlers for updates & saving + #bpy.app.handlers.save_post.append(cls.save_handler) + #bpy.app.handlers.depsgraph_update_post.append(cls.deps_update_handler) + + @classmethod + def unregister(cls): + # remove handlers & co + """try: + bpy.app.handlers.depsgraph_update_post.remove(cls.deps_update_handler) + except:pass + try: + bpy.app.handlers.save_post.remove(cls.save_handler) + except:pass""" + del bpy.types.WindowManager.auto_export_tracker + + del bpy.types.Scene.id_test + + @classmethod + def save_handler(cls, scene, depsgraph): + print("-------------") + print("saved", bpy.data.filepath) + prepare_and_export() + # (re)set a few things after exporting + # reset wether the gltf export paramters were changed since the last save + cls.export_params_changed = False + # reset whether there have been changed objects since the last save + cls.changed_objects_per_scene.clear() + # all our logic is done, mark this as done + + @classmethod + def deps_post_update_handler(cls, scene, depsgraph): + # print("change detection enabled", cls.change_detection_enabled) + #print("change detected", list(map(lambda x: x.name, list(bpy.data.scenes)))) + + """ops = bpy.context.window_manager.operators + print("last operators", ops) + for op in ops: + print("operator", op)""" + active_operator = getattr(bpy.context, 'active_operator' , None) + if active_operator is not None: + #print("Operator", active_operator.bl_label, active_operator.bl_idname) + if active_operator.bl_idname == "EXPORT_SCENE_OT_gltf" and active_operator.gltf_export_id == "blenvy": + # we backup any existing gltf export settings, if there were any + scene = bpy.context.scene + if "glTF2ExportSettings" in scene: + existing_setting = scene["glTF2ExportSettings"] + bpy.context.window_manager.auto_export_tracker.gltf_settings_backup = json.dumps(dict(existing_setting)) + + # we force saving params + active_operator.will_save_settings = True + # we set the last operator here so we can clear the specific settings (yeah for overly complex logic) + cls.last_operator = active_operator + #print("active_operator", active_operator.has_active_exporter_extensions, active_operator.__annotations__.keys(), active_operator.filepath, active_operator.gltf_export_id) + return + + if active_operator.bl_idname == "EXPORT_SCENES_OT_auto_gltf": + # we force saving params + active_operator.will_save_settings = True + active_operator.auto_export = True + # if we are using the operator, bail out for the rest + print("setting stuff for auto_export") + return + + # only deal with changes if we are NOT in the mids of saving/exporting + if cls.change_detection_enabled: + # ignore anything going on with temporary scenes + if not scene.name.startswith(TEMPSCENE_PREFIX): + #print("depsgraph_update_post", scene.name) + changed_scene = scene.name or "" + #print("-------------") + if not changed_scene in cls.changed_objects_per_scene: + cls.changed_objects_per_scene[changed_scene] = {} + # print("cls.changed_objects_per_scene", cls.changed_objects_per_scene) + # depsgraph = bpy.context.evaluated_depsgraph_get() + for obj in depsgraph.updates: + #print("depsgraph update", obj) + if isinstance(obj.id, bpy.types.Object): + # get the actual object + object = bpy.data.objects[obj.id.name] + #print(" changed object", obj.id.name, "changes", obj, "evalutated", obj.id.is_evaluated, "transforms", obj.is_updated_transform, "geometry", obj.is_updated_geometry) + if obj.is_updated_transform or obj.is_updated_geometry: + cls.changed_objects_per_scene[scene.name][obj.id.name] = object + + elif isinstance(obj.id, bpy.types.Material): # or isinstance(obj.id, bpy.types.ShaderNodeTree): + # print(" changed material", obj.id, "scene", scene.name,) + material = bpy.data.materials[obj.id.name] + #now find which objects are using the material + for obj in bpy.data.objects: + for slot in obj.material_slots: + if slot.material == material: + cls.changed_objects_per_scene[scene.name][obj.name] = obj + #print("changed_objects_per_scene", cls.changed_objects_per_scene) + """for obj_name_original in cls.changed_objects_per_scene[scene_name]: + if obj_name_original != ls.changed_objects_per_scene[scene_name][obj_name_original]""" + items = 0 + for scene_name in cls.changed_objects_per_scene: + items += len(cls.changed_objects_per_scene[scene_name].keys()) + if items == 0: + cls.changed_objects_per_scene.clear() + #print("changed_objects_per_scene", cls.changed_objects_per_scene) + + # filter out invalid objects + """for scene_name in cls.changed_objects_per_scene.keys(): + bla = {} + for object_name in cls.changed_objects_per_scene[scene.name]: + object = cls.changed_objects_per_scene[scene.name][object_name]""" + #print("sdfsd", object, object.valid) + #if not cls.changed_objects_per_scene[scene.name][object_name].invalid: + # bla[object_name] = cls.changed_objects_per_scene[scene.name][object_name] + #cls.changed_objects_per_scene[scene.name]= bla + #cls.changed_objects_per_scene[scene_name] = [o for o in cls.changed_objects_per_scene[scene_name] if not o.invalid] + + # get a list of exportable collections for display + # keep it simple, just use Simplenamespace for compatibility with the rest of our code + # TODO: debounce + + def disable_change_detection(self): + #print("disable change detection") + self.change_detection_enabled = False + self.__class__.change_detection_enabled = False + return None + + def enable_change_detection(self): + #print("enable change detection") + self.change_detection_enabled = True + self.__class__.change_detection_enabled = True + #print("bpy.context.window_manager.auto_export_tracker.change_detection_enabled", bpy.context.window_manager.auto_export_tracker.change_detection_enabled) + return None + + def clear_changes(self): + self.changed_objects_per_scene.clear() + self.__class__.changed_objects_per_scene.clear() + + def export_finished(self): + #print("export_finished") + self.exports_count -= 1 + if self.exports_count == 0: + print("preparing to reset change detection") + bpy.app.timers.register(self.enable_change_detection, first_interval=0.1) + #self.enable_change_detection() + return None + + +def get_auto_exporter_settings(): + auto_exporter_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else None + if auto_exporter_settings is not None: + try: + auto_exporter_settings = json.loads(auto_exporter_settings.as_string()) + except: + auto_exporter_settings = {} + else: + auto_exporter_settings = {} + + return auto_exporter_settings \ No newline at end of file diff --git a/tools/blenvy/add_ons/auto_export/constants.py b/tools/blenvy/add_ons/auto_export/constants.py new file mode 100644 index 0000000..1f34ab2 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/constants.py @@ -0,0 +1,11 @@ +TEMPSCENE_PREFIX = "__temp_scene" + +#hard coded custom properties to ignore on export +custom_properties_to_filter_out = [ + 'glTF2ExportSettings', + 'assets', 'user_assets', 'Generated_assets', 'generated_assets', + 'components_meta', 'Components_meta', + '_combine', 'template', + 'Blenvy_scene_type', 'blenvy_scene_type', + 'Materials_path', 'Export_path' + ] diff --git a/tools/gltf_auto_export/auto_export/__init__.py b/tools/blenvy/add_ons/auto_export/levels/__init__.py similarity index 100% rename from tools/gltf_auto_export/auto_export/__init__.py rename to tools/blenvy/add_ons/auto_export/levels/__init__.py diff --git a/tools/blenvy/add_ons/auto_export/levels/bevy_scene_components.py b/tools/blenvy/add_ons/auto_export/levels/bevy_scene_components.py new file mode 100644 index 0000000..61c8aa3 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/levels/bevy_scene_components.py @@ -0,0 +1,64 @@ +def upsert_scene_components(level_scenes): + for scene in level_scenes: + if scene.world is not None: + scene['BlenderBackgroundShader'] = ambient_color_to_component(scene.world) + scene['BlenderShadowSettings'] = scene_shadows_to_component(scene) + + if scene.eevee.use_bloom: + scene['BloomSettings'] = scene_bloom_to_component(scene) + elif 'BloomSettings' in scene: + del scene['BloomSettings'] + + if scene.eevee.use_gtao: + scene['SSAOSettings'] = scene_ao_to_component(scene) + elif 'SSAOSettings' in scene: + del scene['SSAOSettings'] + + scene['BlenderToneMapping'] = scene_tonemapping_to_component(scene) + scene['BlenderColorGrading'] = scene_colorgrading_to_component(scene) + +def remove_scene_components(level_scenes): + pass + +def scene_tonemapping_to_component(scene): + tone_mapping = scene.view_settings.view_transform + blender_to_bevy = { + 'NONE': 'None', + 'AgX': 'AgX', + 'Filmic': 'Filmic', + } + bevy_tone_mapping = blender_to_bevy[tone_mapping] if tone_mapping in blender_to_bevy else 'None' + return bevy_tone_mapping + +def scene_colorgrading_to_component(scene): + return f"(exposure: {scene.view_settings.exposure}, gamma: {scene.view_settings.gamma})" + + +def ambient_color_to_component(world): + color = None + strength = None + try: + color = world.node_tree.nodes['Background'].inputs[0].default_value + strength = world.node_tree.nodes['Background'].inputs[1].default_value + except Exception as ex: + print("failed to parse ambient color: Only background is supported") + + if color is not None and strength is not None: + colorRgba = f"LinearRgba((red: {color[0]}, green: {color[1]}, blue: {color[2]}, alpha: {color[3]}))" + component = f"( color: {colorRgba}, strength: {strength})" + return component + return None + +def scene_shadows_to_component(scene): + cascade_size = scene.eevee.shadow_cascade_size + component = f"(cascade_size: {cascade_size})" + return component + +def scene_bloom_to_component(scene): + component = f"BloomSettings(intensity: {scene.eevee.bloom_intensity})" + return component + +def scene_ao_to_component(scene): + ssao = scene.eevee.use_gtao + component= "SSAOSettings()" + return component diff --git a/tools/blenvy/add_ons/auto_export/levels/export_levels.py b/tools/blenvy/add_ons/auto_export/levels/export_levels.py new file mode 100644 index 0000000..cda7886 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/levels/export_levels.py @@ -0,0 +1,80 @@ +import os +from blenvy.blueprints.blueprint_helpers import inject_blueprints_list_into_level_scene, remove_blueprints_list_from_level_scene +from ..constants import TEMPSCENE_PREFIX +from ..common.generate_temporary_scene_and_export import generate_temporary_scene_and_export, copy_hollowed_collection_into, clear_hollow_scene +from ..common.export_gltf import (generate_gltf_export_settings, export_gltf) +from .is_object_dynamic import is_object_dynamic, is_object_static +from ..utils import upsert_scene_assets + + +def export_level_scene(scene, settings, blueprints_data): + gltf_export_settings = generate_gltf_export_settings(settings) + assets_path_full = getattr(settings,"assets_path_full") + levels_path_full = getattr(settings,"levels_path_full") + + export_blueprints = getattr(settings.auto_export,"export_blueprints") + export_separate_dynamic_and_static_objects = getattr(settings.auto_export, "export_separate_dynamic_and_static_objects") + + gltf_export_settings = { **gltf_export_settings, + 'use_active_scene': True, + 'use_active_collection':True, + 'use_active_collection_with_nested':True, + 'use_visible': False, + 'use_renderable': False, + 'export_apply':True + } + + if export_blueprints : + gltf_output_path = os.path.join(levels_path_full, scene.name) + + inject_blueprints_list_into_level_scene(scene, blueprints_data, settings) + upsert_scene_assets(scene, blueprints_data=blueprints_data, settings=settings) + + if export_separate_dynamic_and_static_objects: + #print("SPLIT STATIC AND DYNAMIC") + # first export static objects + generate_temporary_scene_and_export( + settings, + temp_scene_name=TEMPSCENE_PREFIX, + additional_data = scene, + gltf_export_settings=gltf_export_settings, + gltf_output_path=gltf_output_path, + tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(scene.collection, temp_collection, blueprints_data=blueprints_data, filter=is_object_static, settings=settings), + tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=scene.collection, temp_scene=temp_scene, **params) + ) + + # then export all dynamic objects + gltf_output_path = os.path.join(levels_path_full, scene.name+ "_dynamic") + generate_temporary_scene_and_export( + settings, + temp_scene_name=TEMPSCENE_PREFIX, + additional_data = scene, + gltf_export_settings=gltf_export_settings, + gltf_output_path=gltf_output_path, + tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(scene.collection, temp_collection, blueprints_data=blueprints_data, filter=is_object_dynamic, settings=settings), + tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=scene.collection, temp_scene=temp_scene, **params) + ) + + else: + #print("NO SPLIT") + generate_temporary_scene_and_export( + settings, + temp_scene_name=TEMPSCENE_PREFIX, + additional_data = scene, + gltf_export_settings=gltf_export_settings, + gltf_output_path=gltf_output_path, + tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(scene.collection, temp_collection, blueprints_data=blueprints_data, settings=settings), + tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=scene.collection, temp_scene=temp_scene, **params) + ) + + remove_blueprints_list_from_level_scene(scene) + + else: + gltf_output_path = os.path.join(assets_path_full, scene.name) + print(" exporting gltf to", gltf_output_path, ".gltf/glb") + if settings.auto_export.dry_run == "DISABLED": + export_gltf(gltf_output_path, gltf_export_settings) + + + + diff --git a/tools/blenvy/add_ons/auto_export/levels/get_levels_to_export.py b/tools/blenvy/add_ons/auto_export/levels/get_levels_to_export.py new file mode 100644 index 0000000..bf5584f --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/levels/get_levels_to_export.py @@ -0,0 +1,63 @@ +import bpy +from blenvy.blueprints.blueprint_helpers import check_if_blueprint_on_disk + +# IF collection_instances_combine_mode is not 'split' check for each scene if any object in changes_per_scene has an instance in the scene +def changed_object_in_scene(scene_name, changes_per_scene, blueprints_data, collection_instances_combine_mode): + # Embed / EmbedExternal + blueprints_from_objects = blueprints_data.blueprints_from_objects + + blueprint_instances_in_scene = blueprints_data.blueprint_instances_per_level_scene.get(scene_name, None) + if blueprint_instances_in_scene is not None: + changed_objects = [object_name for change in changes_per_scene.values() for object_name in change.keys()] + changed_blueprints = [blueprints_from_objects[changed] for changed in changed_objects if changed in blueprints_from_objects] + changed_blueprints_with_instances_in_scene = [blueprint for blueprint in changed_blueprints if blueprint.name in blueprint_instances_in_scene.keys()] + + + changed_blueprint_instances= [object for blueprint in changed_blueprints_with_instances_in_scene for object in blueprint_instances_in_scene[blueprint.name]] + # print("changed_blueprint_instances", changed_blueprint_instances,) + + level_needs_export = False + for blueprint_instance in changed_blueprint_instances: + blueprint = blueprints_data.blueprint_name_from_instances[blueprint_instance] + combine_mode = blueprint_instance['_combine'] if '_combine' in blueprint_instance else collection_instances_combine_mode + #print("COMBINE MODE FOR OBJECT", combine_mode) + if combine_mode == 'Embed': + level_needs_export = True + break + elif combine_mode == 'EmbedExternal' and not blueprint.local: + level_needs_export = True + break + # changes => list of changed objects (regardless of wether they have been changed in level scene or in lib scene) + # wich of those objects are blueprint instances + # we need a list of changed objects that are blueprint instances + return level_needs_export + return False + +def is_level_always_export(scene_name): + scene = bpy.data.scenes[scene_name] + return scene['always_export'] if 'always_export' in scene else False + +def should_level_be_exported(scene_name, changed_export_parameters, changes_per_scene, blueprints_data, settings): + export_gltf_extension = getattr(settings, "export_gltf_extension") + levels_path_full = getattr(settings, "levels_path_full") + + change_detection = getattr(settings.auto_export, "change_detection") + collection_instances_combine_mode = getattr(settings.auto_export, "collection_instances_combine_mode") + + # the list of conditions to determine IF a level should be exported or not + return ( + not change_detection + or changed_export_parameters + or is_level_always_export(scene_name) + or scene_name in changes_per_scene.keys() + or changed_object_in_scene(scene_name, changes_per_scene, blueprints_data, collection_instances_combine_mode) + or not check_if_blueprint_on_disk(scene_name, levels_path_full, export_gltf_extension) + ) + +# this also takes the split/embed mode into account: if a collection instance changes AND embed is active, its container level/world should also be exported +def get_levels_to_export(changes_per_scene, changes_per_collection, changed_export_parameters, blueprints_data, settings): + # determine list of level scenes to export + # we have more relaxed rules to determine if the level scenes have changed : any change is ok, (allows easier handling of changes, render settings etc) + level_scenes_to_export = [scene_name for scene_name in settings.level_scenes_names if should_level_be_exported(scene_name, changed_export_parameters, changes_per_scene, blueprints_data, settings)] + + return (level_scenes_to_export) \ No newline at end of file diff --git a/tools/gltf_auto_export/modules/bevy_dynamic.py b/tools/blenvy/add_ons/auto_export/levels/is_object_dynamic.py similarity index 95% rename from tools/gltf_auto_export/modules/bevy_dynamic.py rename to tools/blenvy/add_ons/auto_export/levels/is_object_dynamic.py index aaa6622..89f714e 100644 --- a/tools/gltf_auto_export/modules/bevy_dynamic.py +++ b/tools/blenvy/add_ons/auto_export/levels/is_object_dynamic.py @@ -8,7 +8,7 @@ import bpy def is_object_dynamic(object): is_dynamic = object['Dynamic'] if 'Dynamic' in object else False # only look for data in the original collection if it is not alread marked as dynamic at instance level - if not is_dynamic and object.type == 'EMPTY' and hasattr(object, 'instance_collection') and object.instance_collection != None : + if not is_dynamic and object.type == 'EMPTY' and hasattr(object, 'instance_collection') and object.instance_collection is not None : #print("collection", object.instance_collection, "object", object.name) # get the name of the collection this is an instance of collection_name = object.instance_collection.name diff --git a/tools/blenvy/add_ons/auto_export/settings.py b/tools/blenvy/add_ons/auto_export/settings.py new file mode 100644 index 0000000..a08e9fe --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/settings.py @@ -0,0 +1,126 @@ +import bpy +from bpy_types import (PropertyGroup) +from bpy.props import (EnumProperty, PointerProperty, StringProperty, BoolProperty, CollectionProperty, IntProperty) +from blenvy.settings import load_settings, upsert_settings, generate_complete_settings_dict + +# list of settings we do NOT want to save +settings_black_list = ['settings_save_enabled', 'dry_run'] + +def save_settings(settings, context): + if settings.settings_save_enabled: + settings_dict = generate_complete_settings_dict(settings, AutoExportSettings, []) + upsert_settings(settings.settings_save_path, {key: settings_dict[key] for key in settings_dict.keys() if key not in settings_black_list}, overwrite=True) + +class AutoExportSettings(PropertyGroup): + + settings_save_path = ".blenvy_export_settings" # where to store data in bpy.texts + settings_save_enabled: BoolProperty(name="settings save enabled", default=True) # type: ignore + + auto_export: BoolProperty( + name='Auto export', + description='Automatically export to gltf on save', + default=True, + update=save_settings + ) # type: ignore + + #### change detection + change_detection: BoolProperty( + name='Change detection', + description='Use change detection to determine what/if should be exported', + default=True, + update=save_settings + ) # type: ignore + + materials_in_depth_scan : BoolProperty( + name='In depth scan of materials (could be slow)', + description='serializes more details of materials in order to detect changes (could be slower, but much more accurate in detecting changes)', + default=True, + update=save_settings + ) # type: ignore + + modifiers_in_depth_scan : BoolProperty( + name='In depth scan of modifiers (could be slow)', + description='serializes more details of modifiers (particularly geometry nodes) in order to detect changes (could be slower, but much more accurate in detecting changes)', + default=True, + update=save_settings + ) # type: ignore + + # scenes + + # scene components + export_scene_settings: BoolProperty( + name='Export scene settings', + description='Export scene settings ie AmbientLighting, Bloom, AO etc', + default=False, + update=save_settings + ) # type: ignore + + # blueprint settings + export_blueprints: BoolProperty( + name='Export Blueprints', + description='Replaces collection instances with an Empty with a BlueprintInfo custom property, and enabled a lot more features !', + default=True, + update=save_settings + ) # type: ignore + + export_separate_dynamic_and_static_objects: BoolProperty( + name="Export levels' dynamic and static objects seperatly", + description="""For MAIN scenes only (aka levels), toggle this to generate 2 files per level: + - one with all dynamic data: collection or instances marked as dynamic/ saveable + - one with all static data: anything else that is NOT marked as dynamic""", + default=False, + update=save_settings + ) # type: ignore + + export_materials_library: BoolProperty( + name='Export materials library', + description='remove materials from blueprints and use the material library instead', + default=True, + update=save_settings + ) # type: ignore + + + """ combine mode can be + - 'Split' (default): replace with an empty, creating links to sub blueprints + - 'Embed' : treat it as an embeded object and do not replace it with an empty + - 'EmbedExternal': embed any instance of a non local collection (ie external assets) + + - 'Inject': inject components from sub collection instances into the curent object => this is now a seperate custom property that you can apply to a collecion instance + """ + + collection_instances_combine_mode : EnumProperty( + name='Collection instances', + items=( + ('Split', 'Split', 'replace collection instances with an empty + blueprint, creating links to sub blueprints (Default, Recomended)'), + ('Embed', 'Embed', 'treat collection instances as embeded objects and do not replace them with an empty'), + ('EmbedExternal', 'EmbedExternal', 'treat instances of external (not specifified in the current blend file) collections (aka assets etc) as embeded objects and do not replace them with empties'), + #('Inject', 'Inject', 'inject components from sub collection instances into the curent object') + ), + default='Split', + update=save_settings + ) # type: ignore + + dry_run: EnumProperty( + name="dry run", + description="debug/ develop helper to enable everything but the actual exporting of files", + items=( + ("DISABLED", "Disabled","Run exports normally (no Dry run)"), + ("NO_EXPORT", "No export", "do not actually export gltf files"), + ("NO_PREPARE", "No prepare", "do not actually export gltf files AND do not prepare the exports either (ie no creating fake scenes etc)"), + ), + default="DISABLED", + ) # type: ignore + + + def load_settings(self): + settings = load_settings(self.settings_save_path) + if settings is not None: + self.settings_save_enabled = False # we disable auto_saving of our settings + try: + for setting in settings: + setattr(self, setting, settings[setting]) + except: pass + # TODO: remove setting if there was a failure + + self.settings_save_enabled = True + diff --git a/tools/blenvy/add_ons/auto_export/ui.py b/tools/blenvy/add_ons/auto_export/ui.py new file mode 100644 index 0000000..34f0585 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/ui.py @@ -0,0 +1,74 @@ +def draw_settings_ui(layout, auto_export_settings): + controls_enabled = auto_export_settings.auto_export + + layout.label(text="Auto exports gltf files every time you save your project") + layout.prop(auto_export_settings, "auto_export") + layout.separator() + + header, panel = layout.panel("General", default_closed=False) + header.label(text="General") + if panel: + section = panel.box() + section.enabled = controls_enabled + + op = section.operator("EXPORT_SCENE_OT_gltf", text="Gltf Settings (KEEP 'REMEMBER EXPORT SETTINGS' TOGGLED)")#'glTF 2.0 (.glb/.gltf)') + #op.export_format = 'GLTF_SEPARATE' + op.use_selection=True + op.will_save_settings=True + op.use_visible=True + op.use_renderable=True + op.use_active_collection = True + op.use_active_collection_with_nested=True + op.use_active_scene = True + op.filepath="____dummy____" + op.gltf_export_id = "blenvy" # we specify that we are in a special case + + section.prop(auto_export_settings, "export_scene_settings") + + header, panel = layout.panel("Change Detection", default_closed=False) + header.label(text="Change Detection") + if panel: + section = panel.box() + section.enabled = controls_enabled + section.prop(auto_export_settings, "change_detection", text="Use change detection") + + + section = section.box() + section.enabled = controls_enabled and auto_export_settings.change_detection + + section.prop(auto_export_settings, "materials_in_depth_scan", text="Detailed materials scan") + section.prop(auto_export_settings, "modifiers_in_depth_scan", text="Detailed modifiers scan") + + header, panel = layout.panel("Blueprints", default_closed=False) + header.label(text="Blueprints") + if panel: + section = layout.box() + section.enabled = controls_enabled + section.prop(auto_export_settings, "export_blueprints") + + section = section.box() + section.enabled = controls_enabled and auto_export_settings.export_blueprints + + # collections/blueprints + section.prop(auto_export_settings, "collection_instances_combine_mode") + section.separator() + + section.prop(auto_export_settings, "export_separate_dynamic_and_static_objects") + section.separator() + + # materials + section.prop(auto_export_settings, "export_materials_library") + section = section.box() + section.enabled = controls_enabled and auto_export_settings.export_materials_library + #section.prop(auto_export_settings, "materials_path") + + + + + + + + + + + \ No newline at end of file diff --git a/tools/blenvy/add_ons/auto_export/utils.py b/tools/blenvy/add_ons/auto_export/utils.py new file mode 100644 index 0000000..ed4f566 --- /dev/null +++ b/tools/blenvy/add_ons/auto_export/utils.py @@ -0,0 +1,84 @@ +import bpy +import os +from pathlib import Path +from blenvy.assets.assets_scan import get_blueprint_asset_tree, get_level_scene_assets_tree2 + +def assets_to_fake_ron(list_like): + result = [] + for item in list_like: + result.append(f"(name: \"{item['name']}\", path: \"{item['path']}\")") + + return f"(assets: {result})".replace("'", '') + + return f"({result})".replace("'", '') + + +# TODO : move to assets +def upsert_scene_assets(scene, blueprints_data, settings): + """print("level scene", scene) + for asset in scene.user_assets: + print(" user asset", asset.name, asset.path) + for asset in scene.generated_assets: + print(" generated asset", asset)""" + """for blueprint in blueprints_data.blueprints_per_scenes[scene.name]: + print("BLUEPRINT", blueprint)""" + blueprint_instances_in_scene = blueprints_data.blueprint_instances_per_level_scene.get(scene.name, {}).keys() + blueprints_in_scene = [blueprints_data.blueprints_per_name[blueprint_name] for blueprint_name in blueprint_instances_in_scene] + #yala = [blueprint.collection.user_assets for blueprint in blueprints_in_scene] + #print("dsfsdf", yala) + level_assets = [] + all_assets = [] + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + + blueprints_path = getattr(settings, "blueprints_path") + for blueprint in blueprints_in_scene: + if blueprint.local: + blueprint_exported_path = os.path.join(blueprints_path, f"{blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + blueprint_exported_path = blueprint.collection['export_path'] if 'export_path' in blueprint.collection else None + # add their material path + materials_exported_path = blueprint.collection['materials_path'] if 'materials_path' in blueprint.collection else None + level_assets.append({"name": blueprint.name+"_material", "path": materials_exported_path})#, "generated": True, "internal":blueprint.local, "parent": None}) + + + if blueprint_exported_path is not None: # and not does_asset_exist(assets_list, blueprint_exported_path): + level_assets.append({"name": blueprint.name, "path": blueprint_exported_path})#, "generated": True, "internal":blueprint.local, "parent": None}) + + # now also add the assets of the blueprints # TODO: wait no , these should not be a part of the (scene) local assets + for asset in blueprint.collection.user_assets: + #print("adding assets of blueprint", asset.name) + all_assets.append({"name": asset.name, "path": asset.path}) + + """for asset in level_assets: + print(" generated asset", asset.name, asset.path)""" + + materials_path = getattr(settings, "materials_path") + current_project_name = Path(bpy.context.blend_data.filepath).stem + materials_library_name = f"{current_project_name}_materials" + materials_exported_path = os.path.join(materials_path, f"{materials_library_name}{export_gltf_extension}") + material_assets = [{"name": materials_library_name, "path": materials_exported_path}] # we also add the material library as an asset + print("material_assets", material_assets, "extension", export_gltf_extension) + + + all_assets_raw = get_level_scene_assets_tree2(level_scene=scene, blueprints_data=blueprints_data, settings=settings) + local_assets = [{"name": asset["name"], "path": asset["path"]} for asset in all_assets_raw if asset['parent'] is None and asset["path"] != "" ] + all_assets = [{"name": asset["name"], "path": asset["path"]} for asset in all_assets_raw if asset["path"] != "" ] + print("all_assets_raw", all_assets_raw) + print("all_assets", all_assets) + print("local assets", local_assets + material_assets) + scene["BlueprintAssets"] = assets_to_fake_ron(local_assets + material_assets) + + + #scene["BlueprintAssets"] = assets_to_fake_ron(all_assets + [{"name": asset.name, "path": asset.path} for asset in scene.user_assets] + level_assets + material_assets) + #scene["BlueprintAssets"] = assets_to_fake_ron([{'name':'foo', 'path':'bar'}]) + +def upsert_blueprint_assets(blueprint, blueprints_data, settings): + all_assets_raw = get_blueprint_asset_tree(blueprint=blueprint, blueprints_data=blueprints_data, settings=settings) + + all_assets = [] + auto_assets = [] + local_assets = [{"name": asset["name"], "path": asset["path"]} for asset in all_assets_raw if asset['parent'] is None and asset["path"] != "" ] + print("all_assets_raw", all_assets_raw) + print("local assets", local_assets) + blueprint.collection["BlueprintAssets"] = assets_to_fake_ron(local_assets) diff --git a/tools/gltf_auto_export/helpers/__init__.py b/tools/blenvy/add_ons/bevy_components/__init__.py similarity index 100% rename from tools/gltf_auto_export/helpers/__init__.py rename to tools/blenvy/add_ons/bevy_components/__init__.py diff --git a/tools/gltf_auto_export/modules/__init__.py b/tools/blenvy/add_ons/bevy_components/components/__init__.py similarity index 100% rename from tools/gltf_auto_export/modules/__init__.py rename to tools/blenvy/add_ons/bevy_components/components/__init__.py diff --git a/tools/blenvy/add_ons/bevy_components/components/lists.py b/tools/blenvy/add_ons/bevy_components/components/lists.py new file mode 100644 index 0000000..d809021 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/components/lists.py @@ -0,0 +1,93 @@ +import json +from bpy_types import Operator +from bpy.props import (StringProperty, EnumProperty, IntProperty) +from blenvy.add_ons.bevy_components.utils import get_item_by_type + +class BLENVY_OT_component_list_actions(Operator): + """Move items up and down, add and remove""" + bl_idname = "blenvy.component_list_actions" + bl_label = "List Actions" + bl_description = "Move items up and down, add and remove" + bl_options = {'REGISTER', 'UNDO'} + + action: EnumProperty( + items=( + ('UP', "Up", ""), + ('DOWN', "Down", ""), + ('REMOVE', "Remove", ""), + ('ADD', "Add", ""), + ('SELECT', "Select", "") + ) + ) # type: ignore + + property_group_path: StringProperty( + name="property group path", + description="", + ) # type: ignore + + component_name: StringProperty( + name="component name", + description="", + ) # type: ignore + + item_name: StringProperty( + name="item name", + description="item object/collections we are working on", + default="" + ) # type: ignore + + item_type : EnumProperty( + name="item type", + description="type of the item we are working on : object or collection", + items=( + ('OBJECT', "Object", ""), + ('COLLECTION', "Collection", ""), + ('MESH', "Mesh", ""), + ('MATERIAL', "Material", ""), + ), + default="OBJECT" + ) # type: ignore + + + selection_index: IntProperty() # type: ignore + + def invoke(self, context, event): + item = get_item_by_type(self.item_type, self.item_name) + + # information is stored in component meta + components_in_item = item.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == self.component_name, components_in_item), None) + + propertyGroup = component_meta + for path_item in json.loads(self.property_group_path): + propertyGroup = getattr(propertyGroup, path_item) + + target_list = getattr(propertyGroup, "list") + index = getattr(propertyGroup, "list_index") + + + if self.action == 'DOWN' and index < len(target_list) - 1: + #item_next = scn.rule_list[index + 1].name + target_list.move(index, index + 1) + propertyGroup.list_index += 1 + + elif self.action == 'UP' and index >= 1: + #item_prev = scn.rule_list[index - 1].name + target_list.move(index, index - 1) + propertyGroup.list_index -= 1 + + elif self.action == 'REMOVE': + target_list.remove(index) + propertyGroup.list_index = min(max(0, index - 1), len(target_list) - 1) + + if self.action == 'ADD': + item = target_list.add() + propertyGroup.list_index = index + 1 # we use this to force the change detection + #info = '"%s" added to list' % (item.name) + #self.report({'INFO'}, info) + + if self.action == 'SELECT': + propertyGroup.list_index = self.selection_index + + + return {"FINISHED"} \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/components/maps.py b/tools/blenvy/add_ons/bevy_components/components/maps.py new file mode 100644 index 0000000..77d152f --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/components/maps.py @@ -0,0 +1,151 @@ +import json +from bpy_types import Operator, UIList +from bpy.props import (StringProperty, EnumProperty, PointerProperty, FloatVectorProperty, IntProperty) + +from ..propGroups.conversions_from_prop_group import property_group_value_to_custom_property_value +from blenvy.add_ons.bevy_components.utils import get_item_by_type + +class BLENVY_OT_component_map_actions(Operator): + """Move items up and down, add and remove""" + bl_idname = "blenvy.component_map_actions" + bl_label = "Map Actions" + bl_description = "Move items up and down, add and remove" + bl_options = {'REGISTER', 'UNDO'} + + action: EnumProperty( + items=( + ('UP', "Up", ""), + ('DOWN', "Down", ""), + ('REMOVE', "Remove", ""), + ('ADD', "Add", ""))) # type: ignore + + property_group_path: StringProperty( + name="property group path", + description="", + ) # type: ignore + + component_name: StringProperty( + name="component name", + description="", + ) # type: ignore + + target_index: IntProperty(name="target index", description="index of item to manipulate")# type: ignore + + item_type : EnumProperty( + name="item type", + description="type of the item to select: object or collection", + items=( + ('OBJECT', "Object", ""), + ('COLLECTION', "Collection", ""), + ('MESH', "Mesh", ""), + ('MATERIAL', "Material", ""), + ), + default="OBJECT" + ) # type: ignore + + item_name: StringProperty( + name="object name", + description="object whose component to delete", + default="" + ) # type: ignore + + def invoke(self, context, event): + + item = get_item_by_type(self.item_type, self.item_name) + + # information is stored in component meta + components_in_item = item.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == self.component_name, components_in_item), None) + + propertyGroup = component_meta + for path_item in json.loads(self.property_group_path): + propertyGroup = getattr(propertyGroup, path_item) + + keys_list = getattr(propertyGroup, "list") + index = getattr(propertyGroup, "list_index") + + values_list = getattr(propertyGroup, "values_list") + values_index = getattr(propertyGroup, "values_list_index") + + key_setter = getattr(propertyGroup, "keys_setter") + value_setter = getattr(propertyGroup, "values_setter") + + if self.action == 'DOWN' and index < len(keys_list) - 1: + #item_next = scn.rule_list[index + 1].name + keys_list.move(index, index + 1) + propertyGroup.list_index += 1 + + elif self.action == 'UP' and index >= 1: + #item_prev = scn.rule_list[index - 1].name + keys_list.move(index, index - 1) + propertyGroup.list_index -= 1 + + elif self.action == 'REMOVE': + index = self.target_index + keys_list.remove(index) + values_list.remove(index) + propertyGroup.list_index = min(max(0, index - 1), len(keys_list) - 1) + propertyGroup.values_index = min(max(0, index - 1), len(keys_list) - 1) + + if self.action == 'ADD': + # first we gather all key/value pairs + hashmap = {} + for index, key in enumerate(keys_list): + print("key", key) + key_entry = {} + for field_name in key.field_names: + key_entry[field_name] = getattr(key, field_name, None) + """value_entry = {} + for field_name in values_list[index].field_names: + value_entry[field_name] = values_list[index][field_name]""" + hashmap[json.dumps(key_entry)] = index + + # then we need to find the index of a specific value if it exists + key_entry = {} + for field_name in key_setter.field_names: + key_entry[field_name] = getattr(key_setter, field_name, None) + key_to_add = json.dumps(key_entry) + existing_index = hashmap.get(key_to_add, None) + + if existing_index is None: + #print("adding new value", "key field names", key_setter.field_names, "value_setter", value_setter, "field names", value_setter.field_names) + key = keys_list.add() + # copy the values over + for field_name in key_setter.field_names: + val = getattr(key_setter, field_name, None) + if val is not None: + key[field_name] = val + # TODO: add error handling + + value = values_list.add() + # copy the values over + is_enum = getattr(value_setter, "with_enum", False) + if not is_enum: + for field_name in list(value_setter.field_names): + val = getattr(value_setter, field_name, None) + if val is not None: + value[field_name] = val + else: + selection = getattr(value_setter, "selection", None) + setattr(value, 'selection', selection) + selector = "variant_" + selection + try: + val = getattr(value_setter, selector, None) + for field_name in val.field_names: + source = getattr(val, field_name) + setattr(getattr(value, selector), field_name, source) + except Exception as inst: + print("EROOR", inst) + + # TODO: add error handling + propertyGroup.list_index = index + 1 # we use this to force the change detection + propertyGroup.values_index = index + 1 # we use this to force the change detection + else: + for field_name in value_setter.field_names: + values_list[existing_index][field_name] = value_setter[field_name] + + + #info = '"%s" added to list' % (item.name) + #self.report({'INFO'}, info) + + return {"FINISHED"} \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/components/metadata.py b/tools/blenvy/add_ons/bevy_components/components/metadata.py new file mode 100644 index 0000000..da56226 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/components/metadata.py @@ -0,0 +1,375 @@ +import bpy +from bpy.props import (StringProperty, BoolProperty, PointerProperty) +from bpy_types import (PropertyGroup) + +from ..propGroups.conversions_from_prop_group import property_group_value_to_custom_property_value +from ..propGroups.conversions_to_prop_group import property_group_value_from_custom_property_value +from ..utils import add_component_to_ui_list + +class ComponentMetadata(bpy.types.PropertyGroup): + short_name : bpy.props.StringProperty( + name = "name", + default = "" + ) # type: ignore + + long_name : bpy.props.StringProperty( + name = "long name", + default = "" + ) # type: ignore + + values: bpy.props.StringProperty( + name = "Value", + default = "" + ) # type: ignore + + enabled: BoolProperty( + name="enabled", + description="component enabled", + default=True + ) # type: ignore + + invalid: BoolProperty( + name="invalid", + description="component is invalid, because of missing registration/ other issues", + default=False + ) # type: ignore + + invalid_details: StringProperty( + name="invalid details", + description="detailed information about why the component is invalid", + default="" + ) # type: ignore + + visible: BoolProperty( # REALLY dislike doing this for UI control, but ok hack for now + default=True + ) # type: ignore + + + +class ComponentsMeta(PropertyGroup): + infos_per_component: StringProperty( + name="infos per component", + description="component" + ) # type: ignore + components: bpy.props.CollectionProperty(type = ComponentMetadata) # type: ignore + + # compone + component_selector: StringProperty( + search=add_component_to_ui_list + ) # type: ignore + + + @classmethod + def register(cls): + # you can add components to both objects , collections , meshes & materials + bpy.types.Object.components_meta = PointerProperty(type=ComponentsMeta) + bpy.types.Collection.components_meta = PointerProperty(type=ComponentsMeta) + bpy.types.Mesh.components_meta = PointerProperty(type=ComponentsMeta) + bpy.types.Material.components_meta = PointerProperty(type=ComponentsMeta) + + @classmethod + def unregister(cls): + del bpy.types.Object.components_meta + del bpy.types.Collection.components_meta + del bpy.types.Mesh.components_meta + del bpy.types.Material.components_meta + +# remove no longer valid metadata from item +def cleanup_invalid_metadata(item): + bevy_components = get_bevy_components(item) + if len(bevy_components.keys()) == 0: # no components, bail out + return + components_metadata = item.components_meta.components + to_remove = [] + for index, component_meta in enumerate(components_metadata): + long_name = component_meta.long_name + if long_name not in bevy_components.keys(): + print("component:", long_name, "present in metadata, but not in item") + to_remove.append(index) + for index in to_remove: + components_metadata.remove(index) + + +# returns a component definition ( an entry in registry's type_infos) with matching long name or None if nothing has been found +def find_component_definition_from_long_name(long_name): + registry = bpy.context.window_manager.components_registry + return registry.type_infos.get(long_name, None) + +# FIXME: feels a bit heavy duty, should only be done +# if the components panel is active ? +def ensure_metadata_for_all_items(): + for object in bpy.data.objects: + add_metadata_to_components_without_metadata(object) + for collection in bpy.data.collections: + add_metadata_to_components_without_metadata(collection) + + +# returns whether an item has custom properties without matching metadata +def do_item_custom_properties_have_missing_metadata(item): + components_metadata = getattr(item, "components_meta", None) + if components_metadata == None: + return True + + components_metadata = components_metadata.components + + missing_metadata = False + for component_name in get_bevy_components(item) : + if component_name == "components_meta": + continue + component_meta = next(filter(lambda component: component["long_name"] == component_name, components_metadata), None) + if component_meta == None: + # current component has no metadata but is there even a compatible type in the registry ? + # if not ignore it + component_definition = find_component_definition_from_long_name(component_name) + if component_definition is not None: + missing_metadata = True + break + + return missing_metadata + + +import json + +def upsert_bevy_component(item, long_name, value): + if not 'bevy_components' in item: + item['bevy_components'] = '{}' + bevy_components = json.loads(item['bevy_components']) + bevy_components[long_name] = value + item['bevy_components'] = json.dumps(bevy_components) + #item['bevy_components'][long_name] = value # Sigh, this does not work, hits Blender's 63 char length limit + +def remove_bevy_component(item, long_name): + if 'bevy_components' in item: + bevy_components = json.loads(item['bevy_components']) + if long_name in bevy_components: + del bevy_components[long_name] + item['bevy_components'] = json.dumps(bevy_components) + if long_name in item: + del item[long_name] + +def get_bevy_components(item): + if 'bevy_components' in item: + bevy_components = json.loads(item['bevy_components']) + return bevy_components + return {} + +def get_bevy_component_value_by_long_name(item, long_name): + bevy_components = get_bevy_components(item) + if len(bevy_components.keys()) == 0 : + return None + return bevy_components.get(long_name, None) + +def is_bevy_component_in_item(item, long_name): + return get_bevy_component_value_by_long_name(item, long_name) is not None + +# adds metadata to item only if it is missing +def add_metadata_to_components_without_metadata(item): + registry = bpy.context.window_manager.components_registry + + for component_name in get_bevy_components(item) : + if component_name == "components_meta": + continue + upsert_component_in_item(item, component_name, registry) + +# adds a component to an item (including metadata) using the provided component definition & optional value +def add_component_to_item(item, component_definition, value=None): + warnings = [] + cleanup_invalid_metadata(item) + if item is not None: + # print("add_component_to_item", component_definition) + long_name = component_definition["long_name"] + registry = bpy.context.window_manager.components_registry + if not registry.has_type_infos(): + raise Exception('registry type infos have not been loaded yet or are missing !') + definition = registry.type_infos[long_name] + # now we use our pre_generated property groups to set the initial value of our custom property + (_, propertyGroup) = upsert_component_in_item(item, long_name=long_name, registry=registry) + if value == None: + value = property_group_value_to_custom_property_value(propertyGroup, definition, registry, None) + else: # we have provided a value, that is a raw , custom property value, to set the value of the propertyGroup + item["__disable__update"] = True # disable update callback while we set the values of the propertyGroup "tree" (as a propertyGroup can contain other propertyGroups) + try: + property_group_value_from_custom_property_value(propertyGroup, definition, registry, value) + except: + # if we failed to get the value, we default... to the default + value = property_group_value_to_custom_property_value(propertyGroup, definition, registry, None) + warnings.append(f"failed to get the initial value of {item.name}, using default value") + del item["__disable__update"] + upsert_bevy_component(item, long_name, value) + return warnings + +def upsert_component_in_item(item, long_name, registry): + # print("upsert_component_in_item", item, "component name", component_name) + # TODO: upsert this part too ? + target_components_metadata = item.components_meta.components + component_definition = registry.type_infos.get(long_name, None) + if component_definition is not None: + short_name = component_definition["short_name"] + long_name = component_definition["long_name"] + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + propertyGroup = None + + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + if not component_meta: + component_meta = target_components_metadata.add() + component_meta.short_name = short_name + component_meta.long_name = long_name + propertyGroup = getattr(component_meta, property_group_name, None) + else: # this one has metadata but we check that the relevant property group is present + propertyGroup = getattr(component_meta, property_group_name, None) + + # try to inject propertyGroup if not present + if propertyGroup == None: + #print("propertygroup not found in metadata attempting to inject") + if property_group_name in registry.component_propertyGroups: + # we have found a matching property_group, so try to inject it + # now inject property group + setattr(ComponentMetadata, property_group_name, registry.component_propertyGroups[property_group_name]) # FIXME: not ideal as ALL instances of ComponentMetadata get the propGroup, but have not found a way to assign it per instance + propertyGroup = getattr(component_meta, property_group_name, None) + + # now deal with property groups details + if propertyGroup is not None: + if long_name in registry.invalid_components: + component_meta.enabled = False + component_meta.invalid = True + component_meta.invalid_details = "component contains fields that are not in the schema, disabling" + else: + # clear previous invalid state + if not component_meta.enabled and component_meta.invalid and component_meta.invalid_details == "component contains fields that are not in the schema, disabling": + component_meta.enabled = True + component_meta.invalid = False + component_meta.invalid_details = "" + else: + # if we still have not found the property group, mark it as invalid + component_meta.enabled = False + component_meta.invalid = True + component_meta.invalid_details = "component not present in the schema, possibly renamed? Disabling for now" + # property_group_value_from_custom_property_value(propertyGroup, component_definition, registry, item[component_name]) + + return (component_meta, propertyGroup) + else: + return(None, None) + + +def copy_propertyGroup_values_to_another_item(source_item, target_item, component_name, registry): + if source_item == None or target_item == None or component_name == None: + raise Exception('missing input data, cannot copy component propertryGroup') + + component_definition = find_component_definition_from_long_name(component_name) + long_name = component_name + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + + registry = bpy.context.window_manager.components_registry + + source_components_metadata = source_item.components_meta.components + source_componentMeta = next(filter(lambda component: component["long_name"] == long_name, source_components_metadata), None) + # matching component means we already have this type of component + source_propertyGroup = getattr(source_componentMeta, property_group_name) + + # now deal with the target item + (_, target_propertyGroup) = upsert_component_in_item(target_item, component_name, registry) + # add to item + value = property_group_value_to_custom_property_value(target_propertyGroup, component_definition, registry, None) + upsert_bevy_component(target_item, long_name, value) + + # copy the values over + for field_name in source_propertyGroup.field_names: + if field_name in source_propertyGroup: + target_propertyGroup[field_name] = source_propertyGroup[field_name] + apply_propertyGroup_values_to_item_customProperties(target_item) + + +# TODO: move to propgroups ? +def apply_propertyGroup_values_to_item_customProperties(item): + cleanup_invalid_metadata(item) + registry = bpy.context.window_manager.components_registry + for component_name in get_bevy_components(item) : + """if component_name == "components_meta": + continue""" + (_, propertyGroup) = upsert_component_in_item(item, component_name, registry) + component_definition = find_component_definition_from_long_name(component_name) + if component_definition is not None: + value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None) + upsert_bevy_component(item=item, long_name=component_name, value=value) + +# apply component value(s) to custom property of a single component +def apply_propertyGroup_values_to_item_customProperties_for_component(item, component_name): + registry = bpy.context.window_manager.components_registry + (_, propertyGroup) = upsert_component_in_item(item, component_name, registry) + component_definition = find_component_definition_from_long_name(component_name) + if component_definition is not None: + value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None) + item[component_name] = value + + components_metadata = item.components_meta.components + componentMeta = next(filter(lambda component: component["long_name"] == component_name, components_metadata), None) + if componentMeta: + componentMeta.invalid = False + componentMeta.invalid_details = "" + + +def apply_customProperty_values_to_item_propertyGroups(item): + print("apply custom properties to ", item.name) + registry = bpy.context.window_manager.components_registry + for component_name in get_bevy_components(item) : + if component_name == "components_meta": + continue + component_definition = find_component_definition_from_long_name(component_name) + if component_definition is not None: + property_group_name = registry.get_propertyGroupName_from_longName(component_name) + components_metadata = item.components_meta.components + source_componentMeta = next(filter(lambda component: component["long_name"] == component_name, components_metadata), None) + # matching component means we already have this type of component + propertyGroup = getattr(source_componentMeta, property_group_name, None) + customProperty_value = get_bevy_component_value_by_long_name(item, component_name) + #value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None) + + item["__disable__update"] = True # disable update callback while we set the values of the propertyGroup "tree" (as a propertyGroup can contain other propertyGroups) + property_group_value_from_custom_property_value(propertyGroup, component_definition, registry, customProperty_value) + del item["__disable__update"] + source_componentMeta.invalid = False + source_componentMeta.invalid_details = "" + +# removes the given component from the item: removes both the custom property and the matching metadata from the item +def remove_component_from_item(item, component_name): + # remove the component value + remove_bevy_component(item, component_name) + + # now remove the component's metadata + components_metadata = getattr(item, "components_meta", None) + if components_metadata == None: + return False + + components_metadata = components_metadata.components + to_remove = [] + for index, component_meta in enumerate(components_metadata): + long_name = component_meta.long_name + if long_name == component_name: + to_remove.append(index) + break + for index in to_remove: + components_metadata.remove(index) + return True + +def add_component_from_custom_property(item): + add_metadata_to_components_without_metadata(item) + apply_customProperty_values_to_item_propertyGroups(item) + +def rename_component(registry, item, original_long_name, new_long_name): + type_infos = registry.type_infos + component_definition = type_infos[new_long_name] + + component_ron_value = get_bevy_component_value_by_long_name(item=item, long_name=original_long_name) + if component_ron_value is None and original_long_name in item: + component_ron_value = item[original_long_name] + + remove_component_from_item(item, original_long_name) + print("remove & rename") + return add_component_to_item(item, component_definition, component_ron_value) + + +def toggle_component(item, component_name): + components_in_item = item.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == component_name, components_in_item), None) + if component_meta is not None: + component_meta.visible = not component_meta.visible diff --git a/tools/blenvy/add_ons/bevy_components/components/operators.py b/tools/blenvy/add_ons/bevy_components/components/operators.py new file mode 100644 index 0000000..165a7b3 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/components/operators.py @@ -0,0 +1,520 @@ +import ast +import json +import bpy +from bpy_types import Operator +from bpy.props import (StringProperty, EnumProperty) + +from .metadata import add_component_from_custom_property, add_component_to_item, apply_customProperty_values_to_item_propertyGroups, apply_propertyGroup_values_to_item_customProperties, apply_propertyGroup_values_to_item_customProperties_for_component, copy_propertyGroup_values_to_another_item, get_bevy_component_value_by_long_name, get_bevy_components, is_bevy_component_in_item, remove_component_from_item, rename_component, toggle_component + +from ..utils import get_item_by_type, get_selected_item + +class BLENVY_OT_component_add(Operator): + """Add Bevy component to object/collection""" + bl_idname = "blenvy.component_add" + bl_label = "Add component to object/collection Operator" + bl_options = {"UNDO"} + + component_type: StringProperty( + name="component_type", + description="component type to add", + ) # type: ignore + + def execute(self, context): + target = get_selected_item(context) + print("adding component ", self.component_type, "to target '"+target.name+"'") + + has_component_type = self.component_type != "" + if has_component_type and target is not None: + type_infos = context.window_manager.components_registry.type_infos + component_definition = type_infos[self.component_type] + add_component_to_item(target, component_definition) + + return {'FINISHED'} + +class BLENVY_OT_component_copy(Operator): + """Copy Bevy component from object""" + bl_idname = "blenvy.component_copy" + bl_label = "Copy component Operator" + bl_options = {"UNDO"} + + source_component_name: StringProperty( + name="source component_name (long)", + description="name of the component to copy", + ) # type: ignore + + source_item_name: StringProperty( + name="source item name", + description="name of the object/collection to copy the component from", + ) # type: ignore + + source_item_type: EnumProperty( + name="source item type", + description="type of the object/collection to copy the component from: object or collection", + items=( + ('OBJECT', "Object", ""), + ('COLLECTION', "Collection", ""), + ('MESH', "Mesh", ""), + ('MATERIAL', "Material", ""), + ), + default="OBJECT" + ) # type: ignore + + @classmethod + def register(cls): + bpy.types.WindowManager.copied_source_component_name = StringProperty() + bpy.types.WindowManager.copied_source_item_name = StringProperty() + bpy.types.WindowManager.copied_source_item_type = StringProperty() + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.copied_source_component_name + del bpy.types.WindowManager.copied_source_item_name + del bpy.types.WindowManager.copied_source_item_type + + + def execute(self, context): + if self.source_component_name != '' and self.source_item_name != "" and self.source_item_type != "": + context.window_manager.copied_source_component_name = self.source_component_name + context.window_manager.copied_source_item_name = self.source_item_name + context.window_manager.copied_source_item_type = self.source_item_type + else: + self.report({"ERROR"}, "The source object/collection name or component name to copy a component from have not been specified") + + return {'FINISHED'} + + +class BLENVY_OT_component_paste(Operator): + """Paste Bevy component to object""" + bl_idname = "blenvy.component_paste" + bl_label = "Paste component to item Operator" + bl_options = {"UNDO"} + + def execute(self, context): + source_item_name = context.window_manager.copied_source_item_name + source_item_type = context.window_manager.copied_source_item_type + source_item = get_item_by_type(source_item_type, source_item_name) + print("HEEEERRE", source_item_name, source_item_type, source_item) + """if source_item_type == 'Object': + source_item = bpy.data.objects.get(source_item_name, None) + elif source_item_type == 'Collection': + source_item = bpy.data.collections.get(source_item_name, None)""" + + if source_item is None: + self.report({"ERROR"}, "The source object to copy a component from does not exist") + else: + component_name = context.window_manager.copied_source_component_name + component_value = get_bevy_component_value_by_long_name(source_item, component_name) + if component_value is None: + self.report({"ERROR"}, "The source component to copy from does not exist") + else: + print("pasting component to item:", source_item, "component name:", str(component_name), "component value:" + str(component_value)) + registry = context.window_manager.components_registry + target_item = get_selected_item(context) + copy_propertyGroup_values_to_another_item(source_item, target_item, component_name, registry) + + return {'FINISHED'} + +class BLENVY_OT_component_remove(Operator): + """Remove Bevy component from object/collection""" + bl_idname = "blenvy.component_remove" + bl_label = "Remove component from object/collection Operator" + bl_options = {"UNDO"} + + component_name: StringProperty( + name="component name", + description="component to delete", + ) # type: ignore + + item_name: StringProperty( + name="object name", + description="object whose component to delete", + default="" + ) # type: ignore + + item_type : EnumProperty( + name="item type", + description="type of the item to select: object or collection", + items=( + ('OBJECT', "Object", ""), + ('COLLECTION', "Collection", ""), + ('MESH', "Mesh", ""), + ('MATERIAL', "Material", ""), + ), + default="OBJECT" + ) # type: ignore + + def execute(self, context): + target = None + if self.item_name == "": + self.report({"ERROR"}, "The target to remove ("+ self.component_name +") from does not exist") + else: + target = get_item_by_type(self.item_type, self.item_name) + + print("removing component ", self.component_name, "from object '"+target.name+"'") + + + if target is not None: + if 'bevy_components' in target: + component_value = get_bevy_component_value_by_long_name(target, self.component_name) + if component_value is not None: + remove_component_from_item(target, self.component_name) + else : + self.report({"ERROR"}, "The component to remove ("+ self.component_name +") does not exist") + else: + # for the classic "custom properties" + if self.component_name in target: + del target[self.component_name] + else: + self.report({"ERROR"}, "The component to remove ("+ self.component_name +") does not exist") + + else: + self.report({"ERROR"}, "The target to remove ("+ self.component_name +") from does not exist") + return {'FINISHED'} + + +class BLENVY_OT_component_remove_from_all_items(Operator): + """Remove Bevy component from all items""" + bl_idname = "blenvy.component_remove_from_all_items" + bl_label = "Remove component from all items Operator" + bl_options = {"UNDO"} + + component_name: StringProperty( + name="component name (long name)", + description="component to delete", + ) # type: ignore + + @classmethod + def register(cls): + bpy.types.WindowManager.components_remove_progress = bpy.props.FloatProperty(default=-1.0) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.components_remove_progress + + def execute(self, context): + print("removing component ", self.component_name, "from all objects/collections") + total = len(bpy.data.objects) + len(bpy.data.collections) + for index, object in enumerate(bpy.data.objects): + if len(object.keys()) > 0: + if object is not None and is_bevy_component_in_item(object, self.component_name): + remove_component_from_item(object, self.component_name) + + progress = index / total + context.window_manager.components_remove_progress = progress + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + + for index, collection in enumerate(bpy.data.collections): + if len(collection.keys()) > 0: + if collection is not None and is_bevy_component_in_item(collection, self.component_name): + remove_component_from_item(collection, self.component_name) + + progress = index / total + context.window_manager.components_remove_progress = progress + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + + context.window_manager.components_remove_progress = -1.0 + + return {'FINISHED'} + + +class RenameHelper(bpy.types.PropertyGroup): + original_name: bpy.props.StringProperty(name="") # type: ignore + target_name: bpy.props.StringProperty(name="") # type: ignore + + #object: bpy.props.PointerProperty(type=bpy.types.Object) + @classmethod + def register(cls): + bpy.types.WindowManager.bevy_component_rename_helper = bpy.props.PointerProperty(type=RenameHelper) + + @classmethod + def unregister(cls): + # remove handlers & co + del bpy.types.WindowManager.bevy_component_rename_helper + +class BLENVY_OT_component_rename_component(Operator): + """Rename Bevy component""" + bl_idname = "blenvy.component_rename" + bl_label = "rename component" + bl_options = {"UNDO"} + + original_name: bpy.props.StringProperty(default="") # type: ignore + target_name: StringProperty( + name="target_name", + description="new name of component", + ) # type: ignore + + target_items: bpy.props.StringProperty() # type: ignore + + @classmethod + def register(cls): + bpy.types.WindowManager.components_rename_progress = bpy.props.FloatProperty(default=-1.0) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.components_rename_progress + + def execute(self, context): + registry = context.window_manager.components_registry + settings = context.window_manager.bevy_component_rename_helper + original_name = settings.original_name if self.original_name == "" else self.original_name + target_name = self.target_name + + + print("renaming components: original name", original_name, "target_name", self.target_name, "targets", self.target_items) + target_items = json.loads(self.target_items) + errors = [] + warnings = [] + total = len(target_items) + + + if original_name != '' and target_name != '' and original_name != target_name and len(target_items) > 0: + for index, item_data in enumerate(target_items): + [item_name, item_type] = item_data + item = get_item_by_type(item_type, item_name) + + if item and original_name in get_bevy_components(item) or original_name in item: + try: + # attempt conversion + warnings += rename_component(registry=registry, item=item, original_long_name=original_name, new_long_name=target_name) + except Exception as error: + if '__disable__update' in item: + del item["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure + components_metadata = getattr(item, "components_meta", None) + if components_metadata: + components_metadata = components_metadata.components + component_meta = next(filter(lambda component: component["long_name"] == target_name, components_metadata), None) + if component_meta: + component_meta.invalid = True + component_meta.invalid_details = "wrong custom property value, overwrite them by changing the values in the ui or change them & regenerate" + + errors.append( "wrong custom property values to generate target component: object: '" + item.name + "', error: " + str(error)) + + progress = index / total + context.window_manager.components_rename_progress = progress + + try: + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + except: pass # this is to allow this to run in cli/headless mode + + if len(errors) > 0: + self.report({'ERROR'}, "Failed to rename component: Errors:" + str(errors)) + else: + self.report({'INFO'}, f"Sucessfully renamed component for {total} items: Warnings: {str(warnings)}") + + #clear data after we are done + self.original_name = "" + context.window_manager.bevy_component_rename_helper.original_name = "" + context.window_manager.components_rename_progress = -1.0 + + return {'FINISHED'} + + +class BLENVY_OT_component_from_custom_property(Operator): + """Generate Bevy components from custom property""" + bl_idname = "blenvy.component_from_custom_property" + bl_label = "Generate component from custom_property Operator" + bl_options = {"UNDO"} + + component_name: StringProperty( + name="component name", + description="component to generate custom properties for", + ) # type: ignore + + def execute(self, context): + object = context.object + + error = False + try: + add_component_from_custom_property(object) + except Exception as error: + del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure + error = True + self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Error:" + str(error)) + if not error: + self.report({'INFO'}, "Sucessfully generated UI values for custom properties for selected object") + return {'FINISHED'} + + +class BLENVY_OT_component_fix(Operator): + """Attempt to fix Bevy component""" + bl_idname = "blenvy.component_fix" + bl_label = "Fix component (attempts to)" + bl_options = {"UNDO"} + + component_name: StringProperty( + name="component name", + description="component to fix", + ) # type: ignore + + def execute(self, context): + object = context.object + error = False + try: + apply_propertyGroup_values_to_item_customProperties_for_component(object, self.component_name) + except Exception as error: + if "__disable__update" in object: + del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure + error = True + self.report({'ERROR'}, "Failed to fix component: Error:" + str(error)) + if not error: + self.report({'INFO'}, "Sucessfully fixed component (please double check component & its custom property value)") + return {'FINISHED'} + +class BLENVY_OT_component_toggle_visibility(Operator): + """Toggle Bevy component's visibility""" + bl_idname = "blenvy.component_toggle_visibility" + bl_label = "Toggle component visibility" + bl_options = {"UNDO"} + + component_name: StringProperty( + name="component name", + description="component to toggle", + ) # type: ignore + + def execute(self, context): + target = get_selected_item(context) + toggle_component(target, self.component_name) + return {'FINISHED'} + + + + + +class BLENVY_OT_components_refresh_custom_properties_all(Operator): + """Apply registry to ALL objects: update the custom property values of all objects based on their definition, if any""" + bl_idname = "object.refresh_custom_properties_all" + bl_label = "Apply Registry to all objects" + bl_options = {"UNDO"} + + @classmethod + def register(cls): + bpy.types.WindowManager.custom_properties_from_components_progress_all = bpy.props.FloatProperty(default=-1.0) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.custom_properties_from_components_progress_all + + def execute(self, context): + print("apply registry to all") + #context.window_manager.components_registry.load_schema() + total = len(bpy.data.objects) + + for index, object in enumerate(bpy.data.objects): + apply_propertyGroup_values_to_item_customProperties(object) + progress = index / total + context.window_manager.custom_properties_from_components_progress_all = progress + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + context.window_manager.custom_properties_from_components_progress_all = -1.0 + + return {'FINISHED'} + +class BLENVY_OT_components_refresh_custom_properties_current(Operator): + """Apply registry to CURRENT object: update the custom property values of current object based on their definition, if any""" + bl_idname = "object.refresh_custom_properties_current" + bl_label = "Apply Registry to current object" + bl_options = {"UNDO"} + + @classmethod + def register(cls): + bpy.types.WindowManager.custom_properties_from_components_progress = bpy.props.FloatProperty(default=-1.0) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.custom_properties_from_components_progress + + def execute(self, context): + print("apply registry to current object") + object = context.object + context.window_manager.custom_properties_from_components_progress = 0.5 + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + apply_propertyGroup_values_to_item_customProperties(object) + + context.window_manager.custom_properties_from_components_progress = -1.0 + return {'FINISHED'} + + +class BLENVY_OT_components_refresh_propgroups_current(Operator): + """Update UI values from custom properties to CURRENT object""" + bl_idname = "object.refresh_ui_from_custom_properties_current" + bl_label = "Apply custom_properties to current object" + bl_options = {"UNDO"} + + @classmethod + def register(cls): + bpy.types.WindowManager.components_from_custom_properties_progress = bpy.props.FloatProperty(default=-1.0) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.components_from_custom_properties_progress + + def execute(self, context): + print("apply custom properties to current object") + object = context.object + error = False + try: + apply_customProperty_values_to_item_propertyGroups(object) + progress = 0.5 + context.window_manager.components_from_custom_properties_progress = progress + try: + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + except:pass # ony run in ui + + except Exception as error_message: + del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure + error = True + self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Error:" + str(error_message)) + if not error: + self.report({'INFO'}, "Sucessfully generated UI values for custom properties for selected object") + context.window_manager.components_from_custom_properties_progress = -1.0 + + return {'FINISHED'} + + +class BLENVY_OT_components_refresh_propgroups_all(Operator): + """Update UI values from custom properties to ALL object""" + bl_idname = "object.refresh_ui_from_custom_properties_all" + bl_label = "Apply custom_properties to all objects" + bl_options = {"UNDO"} + + @classmethod + def register(cls): + bpy.types.WindowManager.components_from_custom_properties_progress_all = bpy.props.FloatProperty(default=-1.0) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.components_from_custom_properties_progress_all + + def execute(self, context): + print("apply custom properties to all object") + bpy.context.window_manager.components_registry.disable_all_object_updates = True + errors = [] + total = len(bpy.data.objects) + + for index, object in enumerate(bpy.data.objects): + + try: + apply_customProperty_values_to_item_propertyGroups(object) + except Exception as error: + del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure + errors.append( "object: '" + object.name + "', error: " + str(error)) + + progress = index / total + context.window_manager.components_from_custom_properties_progress_all = progress + # now force refresh the ui + bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) + + + + if len(errors) > 0: + self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Errors:" + str(errors)) + else: + self.report({'INFO'}, "Sucessfully generated UI values for custom properties for all objects") + bpy.context.window_manager.components_registry.disable_all_object_updates = False + context.window_manager.components_from_custom_properties_progress_all = -1.0 + return {'FINISHED'} diff --git a/tools/blenvy/add_ons/bevy_components/components/ui.py b/tools/blenvy/add_ons/bevy_components/components/ui.py new file mode 100644 index 0000000..aa9fb3d --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/components/ui.py @@ -0,0 +1,572 @@ +import json +import bpy + +from ..utils import get_selected_item, get_selection_type +from .metadata import do_item_custom_properties_have_missing_metadata, get_bevy_components + + +def draw_propertyGroup( propertyGroup, layout, nesting =[], rootName=None, item_type="OBJECT", item_name=""): + is_enum = getattr(propertyGroup, "with_enum") + is_list = getattr(propertyGroup, "with_list") + is_map = getattr(propertyGroup, "with_map") + # item in our components hierarchy can get the correct propertyGroup by STRINGS because of course, we cannot pass objects to operators...sigh + + # if it is an enum, the first field name is always the list of enum variants, the others are the variants + field_names = propertyGroup.field_names + #print("") + #print("drawing", propertyGroup, nesting, "component_name", rootName) + if is_enum: + subrow = layout.row() + display_name = field_names[0] if propertyGroup.tupple_or_struct == "struct" else "" + subrow.prop(propertyGroup, field_names[0], text=display_name) + subrow.separator() + selection = getattr(propertyGroup, "selection") + + for fname in field_names[1:]: + if fname == "variant_" + selection: + subrow = layout.row() + display_name = fname if propertyGroup.tupple_or_struct == "struct" else "" + + nestedPropertyGroup = getattr(propertyGroup, fname) + nested = getattr(nestedPropertyGroup, "nested", False) + #print("nestedPropertyGroup", nestedPropertyGroup, fname, nested) + if nested: + draw_propertyGroup(nestedPropertyGroup, subrow.column(), nesting + [fname], rootName, item_type, item_name ) + # if an enum variant is not a propertyGroup + break + elif is_list: + item_list = getattr(propertyGroup, "list") + list_index = getattr(propertyGroup, "list_index") + box = layout.box() + split = box.split(factor=0.9) + list_column, buttons_column = (split.column(),split.column()) + + list_column = list_column.box() + for index, item in enumerate(item_list): + row = list_column.row() + draw_propertyGroup(item, row, nesting, rootName, item_type) + icon = 'CHECKBOX_HLT' if list_index == index else 'CHECKBOX_DEHLT' + op = row.operator('blenvy.component_list_actions', icon=icon, text="") + op.action = 'SELECT' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.selection_index = index + op.item_type = item_type + op.item_name = item_name + + #various control buttons + buttons_column.separator() + row = buttons_column.row() + op = row.operator('blenvy.component_list_actions', icon='ADD', text="") + op.action = 'ADD' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.item_type = item_type + op.item_name = item_name + + row = buttons_column.row() + op = row.operator('blenvy.component_list_actions', icon='REMOVE', text="") + op.action = 'REMOVE' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.item_type = item_type + op.item_name = item_name + + buttons_column.separator() + row = buttons_column.row() + op = row.operator('blenvy.component_list_actions', icon='TRIA_UP', text="") + op.action = 'UP' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.item_type = item_type + op.item_name = item_name + + + row = buttons_column.row() + op = row.operator('blenvy.component_list_actions', icon='TRIA_DOWN', text="") + op.action = 'DOWN' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.item_type = item_type + op.item_name = item_name + + + elif is_map: + root = layout.row().column() + if hasattr(propertyGroup, "list"): # TODO: improve handling of non drawable UI + keys_list = getattr(propertyGroup, "list") + values_list = getattr(propertyGroup, "values_list") + box = root.box() + row = box.row() + row.label(text="Add entry:") + keys_setter = getattr(propertyGroup, "keys_setter") + draw_propertyGroup(keys_setter, row, nesting, rootName, item_type, item_name) + + values_setter = getattr(propertyGroup, "values_setter") + draw_propertyGroup(values_setter, row, nesting, rootName, item_type, item_name) + + op = row.operator('blenvy.component_map_actions', icon='ADD', text="") + op.action = 'ADD' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.item_type = item_type + op.item_name = item_name + + box = root.box() + split = box.split(factor=0.9) + list_column, buttons_column = (split.column(),split.column()) + list_column = list_column.box() + + for index, item in enumerate(keys_list): + row = list_column.row() + draw_propertyGroup(item, row, nesting, rootName, item_type, item_name) + + value = values_list[index] + draw_propertyGroup(value, row, nesting, rootName, item_type, item_name) + + op = row.operator('blenvy.component_map_actions', icon='REMOVE', text="") + op.action = 'REMOVE' + op.component_name = rootName + op.property_group_path = json.dumps(nesting) + op.target_index = index + op.item_type = item_type + op.item_name = item_name + + #various control buttons + buttons_column.separator() + row = buttons_column.row() + + + else: + for fname in field_names: + #subrow = layout.row() + nestedPropertyGroup = getattr(propertyGroup, fname) + nested = getattr(nestedPropertyGroup, "nested", False) + display_name = fname if propertyGroup.tupple_or_struct == "struct" else "" + + if nested: + layout.separator() + layout.separator() + + layout.label(text=display_name) # this is the name of the field/sub field + layout.separator() + subrow = layout.row() + draw_propertyGroup(nestedPropertyGroup, subrow, nesting + [fname], rootName, item_type, item_name ) + else: + subrow = layout.row() + subrow.prop(propertyGroup, fname, text=display_name) + subrow.separator() + + +class BLENVY_PT_components_panel(bpy.types.Panel): + bl_idname = "BLENVY_PT_components_panel" + bl_label = "" + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_category = "Bevy Components" + bl_context = "objectmode" + bl_parent_id = "BLENVY_PT_SidePanel" + + @classmethod + def poll(cls, context): + return context.window_manager.blenvy.mode == 'COMPONENTS' + return context.object is not None + + def draw_header(self, context): + layout = self.layout + name = "" + target_type = "" + selected_item = get_selected_item(context) + target_type = get_selection_type(selected_item) + name = selected_item.name if selected_item is not None else '' + + # name = context.object.name if context.object is not None else '' + layout.label(text=f"Components for {name} ({target_type})") + + #print("object", context.object, "active", context.active_object, "objects", context.selected_objects) + + def draw(self, context): + selected_item = get_selected_item(context) + layout = self.layout + + # we get & load our component registry + registry = bpy.context.window_manager.components_registry + selected_component = bpy.context.window_manager.blenvy.components.component_selector + registry_has_type_infos = registry.has_type_infos() + + if selected_item is not None: + draw_component_ui(layout, selected_item, registry, selected_component, registry_has_type_infos, context) + else: + layout.label(text ="Select an object to edit its components") + + + +def draw_component_ui(layout, object_or_collection, registry, selected_component, registry_has_type_infos, context): + row = layout.row(align=True) + row.prop(context.window_manager.blenvy.components, "component_selector", text="Component: ") + + # add components + row = layout.row(align=True) + op = row.operator("blenvy.component_add", text="Add", icon="ADD") + op.component_type = selected_component + row.enabled = selected_component != '' and selected_component in list(registry.type_infos.keys()) + + layout.separator() + + # paste components + row = layout.row(align=True) + row.operator("blenvy.component_paste", text="Paste component ("+bpy.context.window_manager.copied_source_component_name+")", icon="PASTEDOWN") + row.enabled = registry_has_type_infos and context.window_manager.copied_source_item_name != '' + + layout.separator() + + # upgrate custom props to components + upgradeable_customProperties = registry.has_type_infos() and do_item_custom_properties_have_missing_metadata(object_or_collection) + if upgradeable_customProperties: + row = layout.row(align=True) + op = row.operator("blenvy.component_from_custom_property", text="fix components" , icon="LOOP_FORWARDS") + layout.separator() + + + components_in_item = object_or_collection.components_meta.components + item_type = get_selection_type(object_or_collection) + item_name = object_or_collection.name + #print("components_names", dict(components_bla).keys()) + + for component_name in sorted(get_bevy_components(object_or_collection)) : # sorted by component name, practical + if component_name == "components_meta": + continue + # anything withouth metadata gets skipped, we only want to see real components, not all custom props + component_meta = next(filter(lambda component: component["long_name"] == component_name, components_in_item), None) + if component_meta == None: + continue + + component_invalid = getattr(component_meta, "invalid") + invalid_details = getattr(component_meta, "invalid_details") + component_visible = getattr(component_meta, "visible") + single_field = False + + # our whole row + box = layout.box() + row = box.row(align=True) + # "header" + row.alert = component_invalid + row.prop(component_meta, "enabled", text="") + row.label(text=component_name) + + # we fetch the matching ui property group + root_propertyGroup_name = registry.get_propertyGroupName_from_longName(component_name) + """print("root_propertyGroup_name", root_propertyGroup_name)""" + + if root_propertyGroup_name: + propertyGroup = getattr(component_meta, root_propertyGroup_name, None) + """print("propertyGroup", propertyGroup)""" + if propertyGroup: + # if the component has only 0 or 1 field names, display inline, otherwise change layout + single_field = len(propertyGroup.field_names) < 2 + prop_group_location = box.row(align=True).column() + """if single_field: + prop_group_location = row.column(align=True)#.split(factor=0.9)#layout.row(align=False)""" + + if component_visible: + if component_invalid: + error_message = invalid_details if component_invalid else "Missing component UI data, please reload registry !" + prop_group_location.label(text=error_message) + else: + draw_propertyGroup(propertyGroup, prop_group_location, [root_propertyGroup_name], component_name, item_type, item_name) + else : + row.label(text="details hidden, click on toggle to display") + else: + error_message = invalid_details if component_invalid else "Missing component UI data, please reload registry !" + row.label(text=error_message) + + # "footer" with additional controls + if component_invalid: + if root_propertyGroup_name: + propertyGroup = getattr(component_meta, root_propertyGroup_name, None) + if propertyGroup: + unit_struct = len(propertyGroup.field_names) == 0 + if unit_struct: + op = row.operator("blenvy.component_fix", text="", icon="SHADERFX") + op.component_name = component_name + row.separator() + + op = row.operator("blenvy.component_remove", text="", icon="X") + op.component_name = component_name + op.item_name = object_or_collection.name + op.item_type = get_selection_type(object_or_collection) + row.separator() + + op = row.operator("blenvy.component_copy", text="", icon="COPYDOWN") + op.source_component_name = component_name + op.source_item_name = object_or_collection.name + op.source_item_type = get_selection_type(object_or_collection) + row.separator() + + #if not single_field: + toggle_icon = "TRIA_DOWN" if component_visible else "TRIA_RIGHT" + op = row.operator("blenvy.component_toggle_visibility", text="", icon=toggle_icon) + op.component_name = component_name + #row.separator() + + + +class BLENVY_PT_component_tools_panel(bpy.types.Panel): + """panel listing all the missing bevy types in the schema""" + bl_idname = "BLENVY_PT_component_tools_panel" + bl_label = "Rename / Fix/ Update Components" + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_category = "Bevy Components" + bl_context = "objectmode" + bl_parent_id = "BLENVY_PT_SidePanel" + bl_options = {'DEFAULT_CLOSED'} + bl_description = "advanced tooling" + + @classmethod + def poll(cls, context): + return context.window_manager.blenvy.mode == 'COMPONENTS' + + def draw_invalid_or_unregistered_header(self, layout, items): + row = layout.row() + + for item in items: + col = row.column() + col.label(text=item) + + def draw_invalid_or_unregistered(self, layout, status, component_name, target, item_type): + item_type_short = item_type.lower() + registry = bpy.context.window_manager.components_registry + registry_has_type_infos = registry.has_type_infos() + selected_component = target.components_meta.component_selector + internal = target.library is None + row = layout.row() + + col = row.column() + selector_text = f"{target.name}({item_type_short})" + operator = col.operator("blenvy.select_item", text=selector_text, icon="FILE_BLEND") + operator.target_name = target.name + operator.item_type = item_type + col.enabled = internal + + col = row.column() + col.label(text=status) + + col = row.column() + col.label(text=component_name) + + col = row.column() + if internal: + # each components_meta has a component selector to pick components from + components_meta = target.components_meta + col.prop(components_meta, "component_selector", text="") + else: + col.label(text="external, cannot edit") + + + col = row.column() + operator = col.operator("blenvy.component_rename", text="", icon="SHADERFX") #rename + target_component_name = registry.type_infos[selected_component]['long_name'] if selected_component in registry.type_infos else "" + operator.original_name = component_name + operator.target_items = json.dumps([(target.name, item_type)]) # tupple + operator.target_name = target_component_name + col.enabled = internal and registry_has_type_infos and component_name != "" and target_component_name != "" and component_name != target_component_name + + #print("target", target, target.name, "component_name", component_name, "item type", get_selection_type(target)) + col = row.column() + operator = col.operator("blenvy.component_remove", text="", icon="X") + operator.item_name = target.name + operator.component_name = component_name + operator.item_type = get_selection_type(target) + col.enabled = internal + + def draw_invalid_items(self, layout, upgreadable_entries): + for entry in upgreadable_entries: + (status, custom_property, item, item_type) = entry + self.draw_invalid_or_unregistered(layout, status, custom_property, item, item_type) + + def gather_invalid_item_data(self, item, invalid_component_names, items_with_invalid_components, items_with_original_components, original_name, item_type): + blenvy_custom_properties = ['components_meta', 'bevy_components', 'user_assets', 'generated_assets', 'BlueprintAssets', 'export_path' ] # some of our own hard coded custom properties that should be ignored + upgreadable_entries = [] + + if "components_meta" in item or hasattr(item, "components_meta"): # FIXME; wrong way of determining + components_metadata = item.components_meta.components + object_component_names = [] + + for index, component_meta in enumerate(components_metadata): + long_name = component_meta.long_name + if component_meta.invalid: + upgreadable_entries.append(("Invalid", long_name, item, item_type)) + #self.draw_invalid_or_unregistered(layout, "Invalid", long_name, item, item_type) + if not item.name in items_with_invalid_components: + items_with_invalid_components.append((item.name, item_type)) + if not long_name in invalid_component_names: + invalid_component_names.append(long_name) + + if original_name != "": + if long_name == original_name: + items_with_original_components.append((item.name, item_type)) + + object_component_names.append(long_name) + + for custom_property in item.keys(): + # Invalid (something is wrong) + # Unregistered (not in registry) + # Upgrade Needed (Old-style component) + status = None + if custom_property not in blenvy_custom_properties: + if custom_property not in object_component_names: + status = "Upgrade Needed" + else: + status = "Other issue" + + if status is not None: + upgreadable_entries.append((status, custom_property, item, item_type)) + # self.draw_invalid_or_unregistered(layout, status, custom_property, item, item_type) + + if not item.name in items_with_invalid_components: + items_with_invalid_components.append((item.name, item_type)) + """if not long_name in invalid_component_names: + invalid_component_names.append(custom_property)""" # FIXME + return upgreadable_entries + + def draw(self, context): + layout = self.layout + registry = bpy.context.window_manager.components_registry + registry_has_type_infos = registry.has_type_infos() + type_infos = list(registry.type_infos.keys()) + + row = layout.row() + row.label(text= "* Single item actions: Rename / Fix / Upgrade")#"Invalid/ unregistered components") + + items_with_invalid_components = [] + invalid_component_names = [] + items_with_original_components = [] + + # for possible bulk actions + original_name = bpy.context.window_manager.blenvy.components.source_component_selector + target_component_name = bpy.context.window_manager.blenvy.components.target_component_selector + + upgreadable_entries = [] + for object in bpy.data.objects: # TODO: very inneficent + if len(object.keys()) > 0: + upgreadable_entries += self.gather_invalid_item_data(object, invalid_component_names, items_with_invalid_components, items_with_original_components, original_name, "OBJECT") + for collection in bpy.data.collections: + if len(collection.keys()) > 0: + upgreadable_entries += self.gather_invalid_item_data(collection, invalid_component_names, items_with_invalid_components, items_with_original_components, original_name, "COLLECTION") + for mesh in bpy.data.meshes: + if len(mesh.keys()) > 0: + upgreadable_entries += self.gather_invalid_item_data(mesh, invalid_component_names, items_with_invalid_components, items_with_original_components, original_name, "MESH") + for material in bpy.data.materials: + if len(material.keys()) > 0: + upgreadable_entries += self.gather_invalid_item_data(material, invalid_component_names, items_with_invalid_components, items_with_original_components, original_name, "MATERIAL") + + if len(items_with_invalid_components) > 0: + self.draw_invalid_or_unregistered_header(layout, ["Item","Status", "Component", "Target"]) + self.draw_invalid_items(layout, upgreadable_entries) + else: + layout.box().label(text="No components with anomalies , all good !") + + #print("items_with_original_components", items_with_original_components) + layout.separator() + layout.separator() + row = layout.row() + row.label(text="*Bulk actions: Rename / Fix / Upgrade") + + row = layout.row() + col = row.column() + col.label(text="Component") + col = row.column() + col.label(text="Target") + col = row.column() + col.label(text="------") + + row = layout.row() + col = row.column() + col.prop(bpy.context.window_manager.blenvy.components, "source_component_selector", text="") + + col = row.column() + col.prop(bpy.context.window_manager.blenvy.components, "target_component_selector", text="") + + col = row.column() + components_rename_progress = context.window_manager.components_rename_progress + if components_rename_progress == -1.0: + operator = col.operator("blenvy.component_rename", text="apply", icon="SHADERFX") + operator.original_name = original_name + operator.target_name = target_component_name + operator.target_items = json.dumps(items_with_original_components) + col.enabled = registry_has_type_infos and original_name != "" and original_name != target_component_name and original_name in type_infos and target_component_name in type_infos + else: + if hasattr(layout,"progress") : # only for Blender > 4.0 + col.progress(factor = components_rename_progress, text=f"updating {components_rename_progress * 100.0:.2f}%") + + col = row.column() + remove_components_progress = context.window_manager.components_remove_progress + if remove_components_progress == -1.0: + operator = row.operator("blenvy.component_remove_from_all_items", text="", icon="X") + operator.component_name = context.window_manager.bevy_component_rename_helper.original_name + col.enabled = registry_has_type_infos and original_name != "" + else: + if hasattr(layout,"progress") : # only for Blender > 4.0 + col.progress(factor = remove_components_progress, text=f"updating {remove_components_progress * 100.0:.2f}%") + + layout.separator() + """layout.separator() + row = layout.row() + box= row.box() + box.label(text="Conversions between custom properties and components & vice-versa") + + row = layout.row() + row.label(text="WARNING ! The following operations will overwrite your existing custom properties if they have matching types on the bevy side !") + row.alert = True + + ## + row = layout.row() + custom_properties_from_components_progress_current = context.window_manager.custom_properties_from_components_progress + + if custom_properties_from_components_progress_current == -1.0: + row.operator(BLENVY_OT_components_refresh_custom_properties_current.bl_idname, text="update custom properties of current object" , icon="LOOP_FORWARDS") + row.enabled = registry_has_type_infos and selected_object is not None + else: + if hasattr(layout,"progress") : # only for Blender > 4.0 + layout.progress(factor = custom_properties_from_components_progress_current, text=f"updating {custom_properties_from_components_progress_current * 100.0:.2f}%") + + layout.separator() + row = layout.row() + custom_properties_from_components_progress_all = context.window_manager.custom_properties_from_components_progress_all + + if custom_properties_from_components_progress_all == -1.0: + row.operator(BLENVY_OT_components_refresh_custom_properties_all.bl_idname, text="update custom properties of ALL objects" , icon="LOOP_FORWARDS") + row.enabled = registry_has_type_infos + else: + if hasattr(layout,"progress") : # only for Blender > 4.0 + layout.progress(factor = custom_properties_from_components_progress_all, text=f"updating {custom_properties_from_components_progress_all * 100.0:.2f}%") + + ######################## + + row = layout.row() + row.label(text="WARNING ! The following operations will try to overwrite your existing ui values if they have matching types on the bevy side !") + row.alert = True + + components_from_custom_properties_progress_current = context.window_manager.components_from_custom_properties_progress + + row = layout.row() + if components_from_custom_properties_progress_current == -1.0: + row.operator(BLENVY_OT_components_refresh_propgroups_current.bl_idname, text="update UI FROM custom properties of current object" , icon="LOOP_BACK") + row.enabled = registry_has_type_infos and selected_object is not None + else: + if hasattr(layout,"progress") : # only for Blender > 4.0 + layout.progress(factor = components_from_custom_properties_progress_current, text=f"updating {components_from_custom_properties_progress_current * 100.0:.2f}%") + + layout.separator() + row = layout.row() + components_from_custom_properties_progress_all = context.window_manager.components_from_custom_properties_progress_all + + if components_from_custom_properties_progress_all == -1.0: + row.operator(BLENVY_OT_components_refresh_propgroups_all.bl_idname, text="update UI FROM custom properties of ALL objects" , icon="LOOP_BACK") + row.enabled = registry_has_type_infos + else: + if hasattr(layout,"progress") : # only for Blender > 4.0 + layout.progress(factor = components_from_custom_properties_progress_all, text=f"updating {components_from_custom_properties_progress_all * 100.0:.2f}%") + +""" \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/constants.py b/tools/blenvy/add_ons/bevy_components/constants.py new file mode 100644 index 0000000..5f2267e --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/constants.py @@ -0,0 +1,2 @@ +# FIXME: not sure, hard coded exclude list ? +HIDDEN_COMPONENTS = ['Parent', 'Children'] \ No newline at end of file diff --git a/tools/gltf_auto_export/tests/__init__.py b/tools/blenvy/add_ons/bevy_components/propGroups/__init__.py similarity index 100% rename from tools/gltf_auto_export/tests/__init__.py rename to tools/blenvy/add_ons/bevy_components/propGroups/__init__.py diff --git a/tools/bevy_components/propGroups/conversions_from_prop_group.py b/tools/blenvy/add_ons/bevy_components/propGroups/conversions_from_prop_group.py similarity index 65% rename from tools/bevy_components/propGroups/conversions_from_prop_group.py rename to tools/blenvy/add_ons/bevy_components/propGroups/conversions_from_prop_group.py index b7a6bf4..75366b3 100644 --- a/tools/bevy_components/propGroups/conversions_from_prop_group.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/conversions_from_prop_group.py @@ -5,8 +5,8 @@ conversion_tables = { "char": lambda value: '"'+value+'"', "str": lambda value: '"'+value+'"', - "alloc::string::String": lambda value: '"'+value+'"', - "alloc::borrow::Cow": lambda value: '"'+value+'"', + "alloc::string::String": lambda value: '"'+str(value)+'"', + "alloc::borrow::Cow": lambda value: '"'+str(value)+'"', "glam::Vec2": lambda value: "Vec2(x:"+str(value[0])+ ", y:"+str(value[1])+")", "glam::DVec2": lambda value: "DVec2(x:"+str(value[0])+ ", y:"+str(value[1])+")", @@ -30,29 +30,28 @@ conversion_tables = { #converts the value of a property group(no matter its complexity) into a single custom property value # this is more or less a glorified "to_ron()" method (not quite but close to) def property_group_value_to_custom_property_value(property_group, definition, registry, parent=None, value=None): - component_name = definition["short_name"] + long_name = definition["long_name"] type_info = definition["typeInfo"] if "typeInfo" in definition else None type_def = definition["type"] if "type" in definition else None - type_name = definition["title"] - is_value_type = type_name in conversion_tables - #print("computing custom property", component_name, type_info, type_def, type_name) + is_value_type = long_name in conversion_tables + # print("computing custom property: component name:", long_name, "type_info", type_info, "type_def", type_def, "value", value) if is_value_type: - value = conversion_tables[type_name](value) + value = conversion_tables[long_name](value) elif type_info == "Struct": values = {} if len(property_group.field_names) ==0: value = '()' else: for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["properties"][field_name]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["properties"][field_name]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: - value = property_group_value_to_custom_property_value(child_property_group, item_definition, registry, parent=component_name, value=value) + if item_definition is not None: + value = property_group_value_to_custom_property_value(child_property_group, item_definition, registry, parent=long_name, value=value) else: value = '""' values[field_name] = value @@ -60,14 +59,14 @@ def property_group_value_to_custom_property_value(property_group, definition, re elif type_info == "Tuple": values = {} for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: - value = property_group_value_to_custom_property_value(child_property_group, item_definition, registry, parent=component_name, value=value) + if item_definition is not None: + value = property_group_value_to_custom_property_value(child_property_group, item_definition, registry, parent=long_name, value=value) else: value = '""' values[field_name] = value @@ -76,22 +75,22 @@ def property_group_value_to_custom_property_value(property_group, definition, re elif type_info == "TupleStruct": values = {} for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + #print("toto", index, definition["prefixItems"][index]["type"]["$ref"]) + item_long_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: - value = property_group_value_to_custom_property_value(child_property_group, item_definition, registry, parent=component_name, value=value) + if item_definition is not None: + value = property_group_value_to_custom_property_value(child_property_group, item_definition, registry, parent=long_name, value=value) else: value = '""' values[field_name] = value value = tuple(e for e in list(values.values())) elif type_info == "Enum": - selected = getattr(property_group, component_name) - + selected = getattr(property_group, "selection") if type_def == "object": selection_index = property_group.field_names.index("variant_"+selected) variant_name = property_group.field_names[selection_index] @@ -101,21 +100,21 @@ def property_group_value_to_custom_property_value(property_group, definition, re is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - value = property_group_value_to_custom_property_value(child_property_group, variant_definition, registry, parent=component_name, value=value) + value = property_group_value_to_custom_property_value(child_property_group, variant_definition, registry, parent=long_name, value=value) value = selected + str(value,) #"{}{},".format(selected ,value) elif "properties" in variant_definition: value = getattr(property_group, variant_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - value = property_group_value_to_custom_property_value(child_property_group, variant_definition, registry, parent=component_name, value=value) + value = property_group_value_to_custom_property_value(child_property_group, variant_definition, registry, parent=long_name, value=value) value = selected + str(value,) else: value = getattr(property_group, variant_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None if child_property_group: - value = property_group_value_to_custom_property_value(child_property_group, variant_definition, registry, parent=component_name, value=value) + value = property_group_value_to_custom_property_value(child_property_group, variant_definition, registry, parent=long_name, value=value) value = selected + str(value,) else: value = selected # here the value of the enum is just the name of the variant @@ -124,20 +123,47 @@ def property_group_value_to_custom_property_value(property_group, definition, re elif type_info == "List": item_list = getattr(property_group, "list") - #item_type = getattr(property_group, "type_name_short") value = [] for item in item_list: - item_type_name = getattr(item, "type_name") - definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None - if definition != None: - item_value = property_group_value_to_custom_property_value(item, definition, registry, component_name, None) - if item_type_name.startswith("wrapper_"): #if we have a "fake" tupple for aka for value types, we need to remove one nested level + item_long_name = getattr(item, "long_name") + definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None + if definition is not None: + item_value = property_group_value_to_custom_property_value(item, definition, registry, long_name, None) + if item_long_name.startswith("wrapper_"): #if we have a "fake" tupple for aka for value types, we need to remove one nested level item_value = item_value[0] else: item_value = '""' value.append(item_value) + + elif type_info == "Map": + keys_list = getattr(property_group, "list", {}) + values_list = getattr(property_group, "values_list") + value = {} + for index, key in enumerate(keys_list): + # first get the keys + key_long_name = getattr(key, "long_name") + definition = registry.type_infos[key_long_name] if key_long_name in registry.type_infos else None + if definition is not None: + key_value = property_group_value_to_custom_property_value(key, definition, registry, long_name, None) + if key_long_name.startswith("wrapper_"): #if we have a "fake" tupple for aka for value types, we need to remove one nested level + key_value = key_value[0] + else: + key_value = '""' + # and then the values + val = values_list[index] + value_long_name = getattr(val, "long_name") + definition = registry.type_infos[value_long_name] if value_long_name in registry.type_infos else None + if definition is not None: + val_value = property_group_value_to_custom_property_value(val, definition, registry, long_name, None) + if value_long_name.startswith("wrapper_"): #if we have a "fake" tupple for aka for value types, we need to remove one nested level + val_value = val_value[0] + else: + val_value = '""' + + value[key_value] = val_value + value = str(value).replace('{','@').replace('}','²') # FIXME: eeek !! else: - value = conversion_tables[type_name](value) if is_value_type else value + value = conversion_tables[long_name](value) if is_value_type else value value = '""' if isinstance(value, PropertyGroup) else value #print("generating custom property value", value, type(value)) @@ -147,7 +173,8 @@ def property_group_value_to_custom_property_value(property_group, definition, re if parent == None: value = str(value).replace("'", "") value = value.replace(",)",")") - value = value.replace("{", "(").replace("}", ")") + value = value.replace("{", "(").replace("}", ")") # FIXME: deal with hashmaps value = value.replace("True", "true").replace("False", "false") + value = value.replace('@', '{').replace('²', '}') return value diff --git a/tools/bevy_components/propGroups/conversions_to_prop_group.py b/tools/blenvy/add_ons/bevy_components/propGroups/conversions_to_prop_group.py similarity index 88% rename from tools/bevy_components/propGroups/conversions_to_prop_group.py rename to tools/blenvy/add_ons/bevy_components/propGroups/conversions_to_prop_group.py index 90db393..862f633 100644 --- a/tools/bevy_components/propGroups/conversions_to_prop_group.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/conversions_to_prop_group.py @@ -178,50 +178,41 @@ def is_def_value_type(definition, registry): if definition == None: return True value_types_defaults = registry.value_types_defaults - type_name = definition["title"] - is_value_type = type_name in value_types_defaults + long_name = definition["long_name"] + is_value_type = long_name in value_types_defaults return is_value_type #converts the value of a single custom property into a value (values) of a property group def property_group_value_from_custom_property_value(property_group, definition, registry, value, nesting = []): value_types_defaults = registry.value_types_defaults - type_info = definition["typeInfo"] if "typeInfo" in definition else None type_def = definition["type"] if "type" in definition else None properties = definition["properties"] if "properties" in definition else {} prefixItems = definition["prefixItems"] if "prefixItems" in definition else [] - has_properties = len(properties.keys()) > 0 - has_prefixItems = len(prefixItems) > 0 - is_enum = type_info == "Enum" - is_list = type_info == "List" - type_name = definition["title"] + long_name = definition["long_name"] - #is_value_type = type_def in value_types_defaults or type_name in value_types_defaults - is_value_type = type_name in value_types_defaults + #is_value_type = type_def in value_types_defaults or long_name in value_types_defaults + is_value_type = long_name in value_types_defaults nesting = nesting + [definition["short_name"]] - """print(" ") - print("raw value", value, "nesting", nesting) - print("nesting", len(nesting)) - print("definition", definition)""" if is_value_type: value = value.replace("(", "").replace(")", "")# FIXME: temporary, incoherent use of nesting levels between parse_tuplestruct_string & parse_struct_string - value = type_mappings[type_name](value) if type_name in type_mappings else value + value = type_mappings[long_name](value) if long_name in type_mappings else value return value elif type_info == "Struct": if len(property_group.field_names) != 0 : custom_property_values = parse_struct_string(value, start_nesting=1 if value.startswith("(") else 0) for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["properties"][field_name]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["properties"][field_name]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None custom_prop_value = custom_property_values[field_name] #print("field name", field_name, "value", custom_prop_value) propGroup_value = getattr(property_group, field_name) is_property_group = isinstance(propGroup_value, PropertyGroup) child_property_group = propGroup_value if is_property_group else None - if item_definition != None: + if item_definition is not None: custom_prop_value = property_group_value_from_custom_property_value(child_property_group, item_definition, registry, value=custom_prop_value, nesting=nesting) else: custom_prop_value = custom_prop_value @@ -239,15 +230,15 @@ def property_group_value_from_custom_property_value(property_group, definition, custom_property_values = parse_tuplestruct_string(value, start_nesting=1 if len(nesting) == 1 else 1) for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None custom_property_value = custom_property_values[index] propGroup_value = getattr(property_group, field_name) is_property_group = isinstance(propGroup_value, PropertyGroup) child_property_group = propGroup_value if is_property_group else None - if item_definition != None: + if item_definition is not None: custom_property_value = property_group_value_from_custom_property_value(child_property_group, item_definition, registry, value=custom_property_value, nesting=nesting) if is_def_value_type(item_definition, registry): setattr(property_group , field_name, custom_property_value) @@ -255,15 +246,15 @@ def property_group_value_from_custom_property_value(property_group, definition, elif type_info == "TupleStruct": custom_property_values = parse_tuplestruct_string(value, start_nesting=1 if len(nesting) == 1 else 0) for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None custom_prop_value = custom_property_values[index] value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: + if item_definition is not None: custom_prop_value = property_group_value_from_custom_property_value(child_property_group, item_definition, registry, value=custom_prop_value, nesting=nesting) if is_def_value_type(item_definition, registry): @@ -284,7 +275,7 @@ def property_group_value_from_custom_property_value(property_group, definition, selection_index = property_group.field_names.index(chosen_variant_name) variant_definition = definition["oneOf"][selection_index-1] # first we set WHAT variant is selected - setattr(property_group, field_names[0], chosen_variant_raw) + setattr(property_group, "selection", chosen_variant_raw) # and then we set the value of the variant if "prefixItems" in variant_definition: @@ -308,23 +299,21 @@ def property_group_value_from_custom_property_value(property_group, definition, elif type_info == "List": item_list = getattr(property_group, "list") - item_type_name = getattr(property_group, "type_name_short") - custom_property_values = parse_tuplestruct_string(value, start_nesting=2 if item_type_name.startswith("wrapper_") and value.startswith('(') else 1) # TODO : the additional check here is wrong, there is an issue somewhere in higher level stuff + item_long_name = getattr(property_group, "long_name") + custom_property_values = parse_tuplestruct_string(value, start_nesting=2 if item_long_name.startswith("wrapper_") and value.startswith('(') else 1) # TODO : the additional check here is wrong, there is an issue somewhere in higher level stuff # clear list first item_list.clear() - #print("custom_property_values", custom_property_values, "value", value, "item_type_name", item_type_name) - for raw_value in custom_property_values: new_entry = item_list.add() - item_type_name = getattr(new_entry, "type_name") # we get the REAL type name - definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = getattr(new_entry, "long_name") # we get the REAL type name + definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None - if definition != None: + if definition is not None: property_group_value_from_custom_property_value(new_entry, definition, registry, value=raw_value, nesting=nesting) else: try: value = value.replace("(", "").replace(")", "")# FIXME: temporary, incoherent use of nesting levels between parse_tuplestruct_string & parse_struct_string - value = type_mappings[type_name](value) if type_name in type_mappings else value + value = type_mappings[long_name](value) if long_name in type_mappings else value return value except: pass \ No newline at end of file diff --git a/tools/bevy_components/propGroups/operators.py b/tools/blenvy/add_ons/bevy_components/propGroups/operators.py similarity index 100% rename from tools/bevy_components/propGroups/operators.py rename to tools/blenvy/add_ons/bevy_components/propGroups/operators.py diff --git a/tools/bevy_components/propGroups/process_component.py b/tools/blenvy/add_ons/bevy_components/propGroups/process_component.py similarity index 56% rename from tools/bevy_components/propGroups/process_component.py rename to tools/blenvy/add_ons/bevy_components/propGroups/process_component.py index 1ed8363..16a15e9 100644 --- a/tools/bevy_components/propGroups/process_component.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/process_component.py @@ -5,9 +5,10 @@ from . import process_structs from . import process_tupples from . import process_enum from . import process_list +from . import process_map -def process_component(registry, definition, update, extras=None, nesting = []): - component_name = definition['title'] +def process_component(registry, definition, update, extras=None, nesting_long_names = []): + long_name = definition['long_name'] short_name = definition["short_name"] type_info = definition["typeInfo"] if "typeInfo" in definition else None type_def = definition["type"] if "type" in definition else None @@ -18,8 +19,7 @@ def process_component(registry, definition, update, extras=None, nesting = []): has_prefixItems = len(prefixItems) > 0 is_enum = type_info == "Enum" is_list = type_info == "List" - - # print("processing", short_name, component_name, type_def, type_info) + is_map = type_info == "Map" __annotations__ = {} tupple_or_struct = None @@ -28,66 +28,66 @@ def process_component(registry, definition, update, extras=None, nesting = []): with_items = False with_enum = False with_list = False + with_map = False + #padding = " " * (len(nesting_long_names) + 1) + #print(f"{padding}process component", long_name, "nesting_long_names",nesting_long_names, "foo", has_properties, has_prefixItems, is_enum, is_list, is_map) if has_properties: - __annotations__ = __annotations__ | process_structs.process_structs(registry, definition, properties, update, nesting) + __annotations__ = __annotations__ | process_structs.process_structs(registry, definition, properties, update, nesting_long_names) with_properties = True tupple_or_struct = "struct" + #print(f"{padding}struct") if has_prefixItems: - __annotations__ = __annotations__ | process_tupples.process_tupples(registry, definition, prefixItems, update, nesting) + __annotations__ = __annotations__ | process_tupples.process_tupples(registry, definition, prefixItems, update, nesting_long_names) with_items = True tupple_or_struct = "tupple" if is_enum: - __annotations__ = __annotations__ | process_enum.process_enum(registry, definition, update, nesting) + __annotations__ = __annotations__ | process_enum.process_enum(registry, definition, update, nesting_long_names) with_enum = True if is_list: - __annotations__ = __annotations__ | process_list.process_list(registry, definition, update, nesting) + __annotations__ = __annotations__ | process_list.process_list(registry, definition, update, nesting_long_names) with_list= True + + if is_map: + __annotations__ = __annotations__ | process_map.process_map(registry, definition, update, nesting_long_names) + with_map = True + + # print("AFTER PROCESS", nesting_long_names, long_name) field_names = [] for a in __annotations__: field_names.append(a) - extras = extras if extras is not None else { - "type_name": component_name + "long_name": long_name } - root_component = nesting[0] if len(nesting) > 0 else component_name - # print("DONE:",short_name,"__annotations__", __annotations__) + + nesting_long_names = nesting_long_names + [long_name] + root_component = nesting_long_names[0] if len(nesting_long_names) > 0 else long_name + # print("") property_group_params = { **extras, '__annotations__': __annotations__, 'tupple_or_struct': tupple_or_struct, 'field_names': field_names, - **dict(with_properties = with_properties, with_items= with_items, with_enum= with_enum, with_list= with_list, short_name= short_name), + **dict(with_properties = with_properties, with_items= with_items, with_enum= with_enum, with_list= with_list, with_map = with_map, short_name= short_name, long_name=long_name), 'root_component': root_component } - #FIXME: YIKES, but have not found another way: - """ Withouth this ; the following does not work + + # we need to pass the full hierarchy to disambiguate between components + # Withouth this ; the following does not work + """ -BasicTest - NestingTestLevel2 -BasicTest => the registration & update callback of this one overwrites the first "basicTest" - have not found a cleaner workaround so far """ - property_group_name = registry.generate_propGroup_name(nesting, short_name) - (property_group_pointer, property_group_class) = property_group_from_infos(property_group_name, property_group_params) # add our component propertyGroup to the registry - registry.register_component_propertyGroup(property_group_name, property_group_pointer) - # for practicality, we add an entry for a reverse lookup (short => long name, since we already have long_name => short_name with the keys of the raw registry) - registry.add_shortName_to_longName(short_name, component_name) + (property_group_pointer, property_group_class) = registry.register_component_propertyGroup(nesting_long_names, property_group_params) return (property_group_pointer, property_group_class) -def property_group_from_infos(property_group_name, property_group_parameters): - # print("creating property group", property_group_name) - property_group_class = type(property_group_name, (PropertyGroup,), property_group_parameters) - - bpy.utils.register_class(property_group_class) - property_group_pointer = PointerProperty(type=property_group_class) - - return (property_group_pointer, property_group_class) \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/propGroups/process_enum.py b/tools/blenvy/add_ons/bevy_components/propGroups/process_enum.py new file mode 100644 index 0000000..1a71ea1 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/propGroups/process_enum.py @@ -0,0 +1,65 @@ +from bpy.props import (StringProperty) +from . import process_component + +def process_enum(registry, definition, update, nesting_long_names): + blender_property_mapping = registry.blender_property_mapping + long_name = definition["long_name"] + + type_def = definition["type"] if "type" in definition else None + variants = definition["oneOf"] + + nesting_long_names = nesting_long_names + [long_name] + + __annotations__ = {} + original_type_name = "enum" + + #print("processing enum", long_name)#, definition) + + if type_def == "object": + labels = [] + additional_annotations = {} + for variant in variants: + variant_name = variant["long_name"] + variant_prefixed_name = "variant_" + variant_name + labels.append(variant_name) + + if "prefixItems" in variant: + #print("tupple variant in enum", variant) + registry.add_custom_type(variant_name, variant) + (sub_component_group, _) = process_component.process_component(registry, variant, update, {"nested": True}, nesting_long_names=nesting_long_names) + additional_annotations[variant_prefixed_name] = sub_component_group + elif "properties" in variant: + #print("struct variant in enum", variant) + registry.add_custom_type(variant_name, variant) + (sub_component_group, _) = process_component.process_component(registry, variant, update, {"nested": True}, nesting_long_names=nesting_long_names) + additional_annotations[variant_prefixed_name] = sub_component_group + else: # for the cases where it's neither a tupple nor a structs: FIXME: not 100% sure of this + #print("other variant in enum") + annotations = {"variant_"+variant_name: StringProperty(default="--------")} + additional_annotations = additional_annotations | annotations + + items = tuple((e, e, e) for e in labels) + + blender_property_def = blender_property_mapping[original_type_name] + blender_property = blender_property_def["type"]( + **blender_property_def["presets"],# we inject presets first + items=items, # this is needed by Blender's EnumProperty , which we are using here + update= update +) + __annotations__["selection"] = blender_property + + for a in additional_annotations: + __annotations__[a] = additional_annotations[a] + # enum_value => what field to display + # a second field + property for the "content" of the enum + else: + items = tuple((e, e, "") for e in variants) + blender_property_def = blender_property_mapping[original_type_name] + blender_property = blender_property_def["type"]( + **blender_property_def["presets"],# we inject presets first + items=items, + update= update + ) + __annotations__["selection"] = blender_property + + return __annotations__ diff --git a/tools/bevy_components/propGroups/process_list.py b/tools/blenvy/add_ons/bevy_components/propGroups/process_list.py similarity index 63% rename from tools/bevy_components/propGroups/process_list.py rename to tools/blenvy/add_ons/bevy_components/propGroups/process_list.py index 0d9fc73..8c884e4 100644 --- a/tools/bevy_components/propGroups/process_list.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/process_list.py @@ -2,34 +2,34 @@ from bpy.props import (StringProperty, IntProperty, CollectionProperty) from .utils import generate_wrapper_propertyGroup from . import process_component -def process_list(registry, definition, update, nesting=[]): +def process_list(registry, definition, update, nesting_long_names=[]): value_types_defaults = registry.value_types_defaults type_infos = registry.type_infos - short_name = definition["short_name"] + long_name = definition["long_name"] ref_name = definition["items"]["type"]["$ref"].replace("#/$defs/", "") + + nesting_long_names = nesting_long_names + [long_name] item_definition = type_infos[ref_name] - item_long_name = item_definition["title"] - item_short_name = item_definition["short_name"] + item_long_name = item_definition["long_name"] is_item_value_type = item_long_name in value_types_defaults property_group_class = None #if the content of the list is a unit type, we need to generate a fake wrapper, otherwise we cannot use layout.prop(group, "propertyName") as there is no propertyName ! if is_item_value_type: - property_group_class = generate_wrapper_propertyGroup(short_name, item_long_name, definition["items"]["type"]["$ref"],registry, update) + property_group_class = generate_wrapper_propertyGroup(long_name, item_long_name, definition["items"]["type"]["$ref"], registry, update, nesting_long_names=nesting_long_names) else: - (_, list_content_group_class) = process_component.process_component(registry, item_definition, update, {"nested": True, "type_name": item_long_name}, nesting) + (_, list_content_group_class) = process_component.process_component(registry, item_definition, update, {"nested": True, "long_name": item_long_name}, nesting_long_names=nesting_long_names) property_group_class = list_content_group_class - nesting = nesting+[short_name] item_collection = CollectionProperty(type=property_group_class) - item_short_name = item_short_name if not is_item_value_type else "wrapper_" + item_short_name + item_long_name = item_long_name if not is_item_value_type else "wrapper_" + item_long_name __annotations__ = { "list": item_collection, "list_index": IntProperty(name = "Index for list", default = 0, update=update), - "type_name_short": StringProperty(default=item_short_name) + "long_name": StringProperty(default=item_long_name) } return __annotations__ \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/propGroups/process_map.py b/tools/blenvy/add_ons/bevy_components/propGroups/process_map.py new file mode 100644 index 0000000..2b9d261 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/propGroups/process_map.py @@ -0,0 +1,75 @@ +from bpy.props import (StringProperty, IntProperty, CollectionProperty, PointerProperty) +from .utils import generate_wrapper_propertyGroup +from . import process_component + +def process_map(registry, definition, update, nesting_long_names=[]): + value_types_defaults = registry.value_types_defaults + type_infos = registry.type_infos + + long_name = definition["long_name"] + + nesting_long_names = nesting_long_names + [long_name] + + value_ref_name = definition["valueType"]["type"]["$ref"].replace("#/$defs/", "") + key_ref_name = definition["keyType"]["type"]["$ref"].replace("#/$defs/", "") + + #print("definition", definition) + __annotations__ = {} + + if key_ref_name in type_infos: + key_definition = type_infos[key_ref_name] + original_long_name = key_definition["long_name"] + is_key_value_type = original_long_name in value_types_defaults + definition_link = definition["keyType"]["type"]["$ref"] + + #if the content of the list is a unit type, we need to generate a fake wrapper, otherwise we cannot use layout.prop(group, "propertyName") as there is no propertyName ! + if is_key_value_type: + keys_property_group_class = generate_wrapper_propertyGroup(f"{long_name}_keys", original_long_name, definition_link, registry, update, nesting_long_names=nesting_long_names) + else: + (_, list_content_group_class) = process_component.process_component(registry, key_definition, update, {"nested": True, "long_name": original_long_name}, nesting_long_names=nesting_long_names) + keys_property_group_class = list_content_group_class + + keys_collection = CollectionProperty(type=keys_property_group_class) + keys_property_group_pointer = PointerProperty(type=keys_property_group_class) + else: + #__annotations__["list"] = StringProperty(default="N/A") + registry.add_missing_typeInfo(key_ref_name) + + if value_ref_name in type_infos: + value_definition = type_infos[value_ref_name] + original_long_name = value_definition["long_name"] + is_value_value_type = original_long_name in value_types_defaults + definition_link = definition["valueType"]["type"]["$ref"] + + #if the content of the list is a unit type, we need to generate a fake wrapper, otherwise we cannot use layout.prop(group, "propertyName") as there is no propertyName ! + if is_value_value_type: + values_property_group_class = generate_wrapper_propertyGroup(f"{long_name}_values", original_long_name, definition_link, registry, update, nesting_long_names) + else: + + (_, list_content_group_class) = process_component.process_component(registry, value_definition, update, {"nested": True, "long_name": original_long_name}, nesting_long_names) + values_property_group_class = list_content_group_class + + values_collection = CollectionProperty(type=values_property_group_class) + values_property_group_pointer = PointerProperty(type=values_property_group_class) + + else: + #__annotations__["list"] = StringProperty(default="N/A") + registry.add_missing_typeInfo(value_ref_name) + + + if key_ref_name in type_infos and value_ref_name in type_infos: + #print("hashmap processed normally: key_ref_name",key_ref_name, "value_ref_name", value_ref_name ) + __annotations__ = { + "list": keys_collection, + "list_index": IntProperty(name = "Index for keys", default = 0, update=update), + "keys_setter":keys_property_group_pointer, + + "values_list": values_collection, + "values_list_index": IntProperty(name = "Index for values", default = 0, update=update), + "values_setter":values_property_group_pointer, + } + else: + # the root component also becomes invalid (in practice it is not always a component, but good enough) + registry.add_invalid_component(nesting_long_names[0]) + + return __annotations__ diff --git a/tools/bevy_components/propGroups/process_structs.py b/tools/blenvy/add_ons/bevy_components/propGroups/process_structs.py similarity index 70% rename from tools/bevy_components/propGroups/process_structs.py rename to tools/blenvy/add_ons/bevy_components/propGroups/process_structs.py index 89ac7e7..255111e 100644 --- a/tools/bevy_components/propGroups/process_structs.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/process_structs.py @@ -1,29 +1,29 @@ from bpy.props import (StringProperty) from . import process_component -def process_structs(registry, definition, properties, update, nesting): +def process_structs(registry, definition, properties, update, nesting_long_names): value_types_defaults = registry.value_types_defaults blender_property_mapping = registry.blender_property_mapping type_infos = registry.type_infos - short_name = definition["short_name"] + long_name = definition["long_name"] __annotations__ = {} default_values = {} - nesting = nesting + [short_name] + nesting_long_names = nesting_long_names + [long_name] for property_name in properties.keys(): ref_name = properties[property_name]["type"]["$ref"].replace("#/$defs/", "") if ref_name in type_infos: original = type_infos[ref_name] - original_type_name = original["title"] - is_value_type = original_type_name in value_types_defaults - value = value_types_defaults[original_type_name] if is_value_type else None + original_long_name = original["long_name"] + is_value_type = original_long_name in value_types_defaults + value = value_types_defaults[original_long_name] if is_value_type else None default_values[property_name] = value if is_value_type: - if original_type_name in blender_property_mapping: - blender_property_def = blender_property_mapping[original_type_name] + if original_long_name in blender_property_mapping: + blender_property_def = blender_property_mapping[original_long_name] blender_property = blender_property_def["type"]( **blender_property_def["presets"],# we inject presets first name = property_name, @@ -32,15 +32,15 @@ def process_structs(registry, definition, properties, update, nesting): ) __annotations__[property_name] = blender_property else: - original_long_name = original["title"] - (sub_component_group, _) = process_component.process_component(registry, original, update, {"nested": True, "type_name": original_long_name}, nesting) + original_long_name = original["long_name"] + (sub_component_group, _) = process_component.process_component(registry, original, update, {"nested": True, "long_name": original_long_name}, nesting_long_names+[property_name]) __annotations__[property_name] = sub_component_group # if there are sub fields, add an attribute "sub_fields" possibly a pointer property ? or add a standard field to the type , that is stored under "attributes" and not __annotations (better) else: # component not found in type_infos, generating placeholder - __annotations__[property_name] = StringProperty(default="N/A") + __annotations__[property_name] = StringProperty(default="Struct N/A") # Not sure about the usefullness of this, as we do not show a propgroup in the UI if it is invalid registry.add_missing_typeInfo(ref_name) # the root component also becomes invalid (in practice it is not always a component, but good enough) - registry.add_invalid_component(nesting[0]) + registry.add_invalid_component(nesting_long_names[0]) return __annotations__ diff --git a/tools/bevy_components/propGroups/process_tupples.py b/tools/blenvy/add_ons/bevy_components/propGroups/process_tupples.py similarity index 73% rename from tools/bevy_components/propGroups/process_tupples.py rename to tools/blenvy/add_ons/bevy_components/propGroups/process_tupples.py index feafcc2..acd6a00 100644 --- a/tools/bevy_components/propGroups/process_tupples.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/process_tupples.py @@ -1,13 +1,13 @@ from bpy.props import (StringProperty) from . import process_component -def process_tupples(registry, definition, prefixItems, update, nesting=[]): +def process_tupples(registry, definition, prefixItems, update, nesting_long_names=[]): value_types_defaults = registry.value_types_defaults blender_property_mapping = registry.blender_property_mapping type_infos = registry.type_infos - short_name = definition["short_name"] + long_name = definition["long_name"] - nesting = nesting+[short_name] + nesting_long_names = nesting_long_names + [long_name] __annotations__ = {} default_values = [] @@ -19,16 +19,16 @@ def process_tupples(registry, definition, prefixItems, update, nesting=[]): if ref_name in type_infos: original = type_infos[ref_name] - original_type_name = original["title"] - is_value_type = original_type_name in value_types_defaults + original_long_name = original["long_name"] + is_value_type = original_long_name in value_types_defaults - value = value_types_defaults[original_type_name] if is_value_type else None + value = value_types_defaults[original_long_name] if is_value_type else None default_values.append(value) prefix_infos.append(original) if is_value_type: - if original_type_name in blender_property_mapping: - blender_property_def = blender_property_mapping[original_type_name] + if original_long_name in blender_property_mapping: + blender_property_def = blender_property_mapping[original_long_name] blender_property = blender_property_def["type"]( **blender_property_def["presets"],# we inject presets first name = property_name, @@ -38,15 +38,15 @@ def process_tupples(registry, definition, prefixItems, update, nesting=[]): __annotations__[property_name] = blender_property else: - original_long_name = original["title"] - (sub_component_group, _) = process_component.process_component(registry, original, update, {"nested": True, "type_name": original_long_name}, nesting) + original_long_name = original["long_name"] + (sub_component_group, _) = process_component.process_component(registry, original, update, {"nested": True, "long_name": original_long_name}, nesting_long_names=nesting_long_names) __annotations__[property_name] = sub_component_group else: # component not found in type_infos, generating placeholder __annotations__[property_name] = StringProperty(default="N/A") registry.add_missing_typeInfo(ref_name) # the root component also becomes invalid (in practice it is not always a component, but good enough) - registry.add_invalid_component(nesting[0]) + registry.add_invalid_component(nesting_long_names[0]) return __annotations__ diff --git a/tools/blenvy/add_ons/bevy_components/propGroups/prop_groups.py b/tools/blenvy/add_ons/bevy_components/propGroups/prop_groups.py new file mode 100644 index 0000000..3ba245c --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/propGroups/prop_groups.py @@ -0,0 +1,43 @@ +import json +import bpy + +from .conversions_from_prop_group import property_group_value_to_custom_property_value +from .process_component import process_component +from .utils import update_calback_helper +from ..utils import get_selected_item + +## main callback function, fired whenever any property changes, no matter the nesting level +def update_component(self, context, definition, component_name): + registry = bpy.context.window_manager.components_registry + + current_object_or_collection = get_selected_item(context) + update_disabled = current_object_or_collection["__disable__update"] if "__disable__update" in current_object_or_collection else False + update_disabled = registry.disable_all_object_updates or update_disabled # global settings + if update_disabled: + return + components_in_object = current_object_or_collection.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == component_name, components_in_object), None) + + if component_meta is not None: + property_group_name = registry.get_propertyGroupName_from_longName(component_name) + property_group = getattr(component_meta, property_group_name) + # we use our helper to set the values + previous = json.loads(current_object_or_collection['bevy_components']) + previous[component_name] = property_group_value_to_custom_property_value(property_group, definition, registry, None) + current_object_or_collection['bevy_components'] = json.dumps(previous) + + +def generate_propertyGroups_for_components(): + registry = bpy.context.window_manager.components_registry + if not registry.has_type_infos(): + registry.load_type_infos() + + type_infos = registry.type_infos + + for root_type_name in type_infos: + definition = type_infos[root_type_name] + #print("root property", component_name,f"({is_component})") + process_component(registry, definition, update_calback_helper(definition, update_component, root_type_name), extras=None, nesting_long_names=[]) + + # if we had to add any wrapper types on the fly, process them now + registry.process_custom_types() \ No newline at end of file diff --git a/tools/bevy_components/propGroups/utils.py b/tools/blenvy/add_ons/bevy_components/propGroups/utils.py similarity index 71% rename from tools/bevy_components/propGroups/utils.py rename to tools/blenvy/add_ons/bevy_components/propGroups/utils.py index b784962..9c0b928 100644 --- a/tools/bevy_components/propGroups/utils.py +++ b/tools/blenvy/add_ons/bevy_components/propGroups/utils.py @@ -8,12 +8,16 @@ from bpy_types import PropertyGroup # this helper creates a "fake"/wrapper property group that is NOT a real type in the registry # usefull for things like value types in list items etc -def generate_wrapper_propertyGroup(short_name, item_long_name, definition, registry, update): +def generate_wrapper_propertyGroup(wrapped_type_long_name, item_long_name, definition_link, registry, update, nesting_long_names=[]): value_types_defaults = registry.value_types_defaults blender_property_mapping = registry.blender_property_mapping is_item_value_type = item_long_name in value_types_defaults - wrapper_name = "wrapper_" + short_name + + wrapper_name = "wrapper_" + wrapped_type_long_name + + #nesting = nesting + [short_name] + nesting_long_names = nesting_long_names + [wrapper_name] wrapper_definition = { "isComponent": False, @@ -22,17 +26,21 @@ def generate_wrapper_propertyGroup(short_name, item_long_name, definition, regis "prefixItems": [ { "type": { - "$ref": definition + "$ref": definition_link } } ], - "short_name": wrapper_name, - "title": wrapper_name, + "short_name": wrapper_name, # FIXME !!! + "long_name": wrapper_name, "type": "array", "typeInfo": "TupleStruct" } + + # we generate a very small 'hash' for the component name + property_group_name = registry.generate_propGroup_name(nesting=nesting_long_names) registry.add_custom_type(wrapper_name, wrapper_definition) + blender_property = StringProperty(default="", update=update) if item_long_name in blender_property_mapping: value = value_types_defaults[item_long_name] if is_item_value_type else None @@ -51,10 +59,9 @@ def generate_wrapper_propertyGroup(short_name, item_long_name, definition, regis '__annotations__': wrapper_annotations, 'tupple_or_struct': "tupple", 'field_names': ['0'], - **dict(with_properties = False, with_items= True, with_enum= False, with_list= False, short_name= wrapper_name, type_name=wrapper_name), - #'root_component': root_component + **dict(with_properties = False, with_items= True, with_enum= False, with_list= False, with_map =False, short_name=wrapper_name, long_name=wrapper_name), } - property_group_class = type(wrapper_name, (PropertyGroup,), property_group_params) + property_group_class = type(property_group_name, (PropertyGroup,), property_group_params) bpy.utils.register_class(property_group_class) return property_group_class \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/registry/__init__.py b/tools/blenvy/add_ons/bevy_components/registry/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/add_ons/bevy_components/registry/hashing/__init__.py b/tools/blenvy/add_ons/bevy_components/registry/hashing/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/add_ons/bevy_components/registry/hashing/sboxes.py b/tools/blenvy/add_ons/bevy_components/registry/hashing/sboxes.py new file mode 100644 index 0000000..c88d976 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/registry/hashing/sboxes.py @@ -0,0 +1,515 @@ +t1 = [0x02AAB17CF7E90C5E, 0xAC424B03E243A8EC, + 0x72CD5BE30DD5FCD3, 0x6D019B93F6F97F3A, + 0xCD9978FFD21F9193, 0x7573A1C9708029E2, + 0xB164326B922A83C3, 0x46883EEE04915870, + 0xEAACE3057103ECE6, 0xC54169B808A3535C, + 0x4CE754918DDEC47C, 0x0AA2F4DFDC0DF40C, + 0x10B76F18A74DBEFA, 0xC6CCB6235AD1AB6A, + 0x13726121572FE2FF, 0x1A488C6F199D921E, + 0x4BC9F9F4DA0007CA, 0x26F5E6F6E85241C7, + 0x859079DBEA5947B6, 0x4F1885C5C99E8C92, + 0xD78E761EA96F864B, 0x8E36428C52B5C17D, + 0x69CF6827373063C1, 0xB607C93D9BB4C56E, + 0x7D820E760E76B5EA, 0x645C9CC6F07FDC42, + 0xBF38A078243342E0, 0x5F6B343C9D2E7D04, + 0xF2C28AEB600B0EC6, 0x6C0ED85F7254BCAC, + 0x71592281A4DB4FE5, 0x1967FA69CE0FED9F, + 0xFD5293F8B96545DB, 0xC879E9D7F2A7600B, + 0x860248920193194E, 0xA4F9533B2D9CC0B3, + 0x9053836C15957613, 0xDB6DCF8AFC357BF1, + 0x18BEEA7A7A370F57, 0x037117CA50B99066, + 0x6AB30A9774424A35, 0xF4E92F02E325249B, + 0x7739DB07061CCAE1, 0xD8F3B49CECA42A05, + 0xBD56BE3F51382F73, 0x45FAED5843B0BB28, + 0x1C813D5C11BF1F83, 0x8AF0E4B6D75FA169, + 0x33EE18A487AD9999, 0x3C26E8EAB1C94410, + 0xB510102BC0A822F9, 0x141EEF310CE6123B, + 0xFC65B90059DDB154, 0xE0158640C5E0E607, + 0x884E079826C3A3CF, 0x930D0D9523C535FD, + 0x35638D754E9A2B00, 0x4085FCCF40469DD5, + 0xC4B17AD28BE23A4C, 0xCAB2F0FC6A3E6A2E, + 0x2860971A6B943FCD, 0x3DDE6EE212E30446, + 0x6222F32AE01765AE, 0x5D550BB5478308FE, + 0xA9EFA98DA0EDA22A, 0xC351A71686C40DA7, + 0x1105586D9C867C84, 0xDCFFEE85FDA22853, + 0xCCFBD0262C5EEF76, 0xBAF294CB8990D201, + 0xE69464F52AFAD975, 0x94B013AFDF133E14, + 0x06A7D1A32823C958, 0x6F95FE5130F61119, + 0xD92AB34E462C06C0, 0xED7BDE33887C71D2, + 0x79746D6E6518393E, 0x5BA419385D713329, + 0x7C1BA6B948A97564, 0x31987C197BFDAC67, + 0xDE6C23C44B053D02, 0x581C49FED002D64D, + 0xDD474D6338261571, 0xAA4546C3E473D062, + 0x928FCE349455F860, 0x48161BBACAAB94D9, + 0x63912430770E6F68, 0x6EC8A5E602C6641C, + 0x87282515337DDD2B, 0x2CDA6B42034B701B, + 0xB03D37C181CB096D, 0xE108438266C71C6F, + 0x2B3180C7EB51B255, 0xDF92B82F96C08BBC, + 0x5C68C8C0A632F3BA, 0x5504CC861C3D0556, + 0xABBFA4E55FB26B8F, 0x41848B0AB3BACEB4, + 0xB334A273AA445D32, 0xBCA696F0A85AD881, + 0x24F6EC65B528D56C, 0x0CE1512E90F4524A, + 0x4E9DD79D5506D35A, 0x258905FAC6CE9779, + 0x2019295B3E109B33, 0xF8A9478B73A054CC, + 0x2924F2F934417EB0, 0x3993357D536D1BC4, + 0x38A81AC21DB6FF8B, 0x47C4FBF17D6016BF, + 0x1E0FAADD7667E3F5, 0x7ABCFF62938BEB96, + 0xA78DAD948FC179C9, 0x8F1F98B72911E50D, + 0x61E48EAE27121A91, 0x4D62F7AD31859808, + 0xECEBA345EF5CEAEB, 0xF5CEB25EBC9684CE, + 0xF633E20CB7F76221, 0xA32CDF06AB8293E4, + 0x985A202CA5EE2CA4, 0xCF0B8447CC8A8FB1, + 0x9F765244979859A3, 0xA8D516B1A1240017, + 0x0BD7BA3EBB5DC726, 0xE54BCA55B86ADB39, + 0x1D7A3AFD6C478063, 0x519EC608E7669EDD, + 0x0E5715A2D149AA23, 0x177D4571848FF194, + 0xEEB55F3241014C22, 0x0F5E5CA13A6E2EC2, + 0x8029927B75F5C361, 0xAD139FABC3D6E436, + 0x0D5DF1A94CCF402F, 0x3E8BD948BEA5DFC8, + 0xA5A0D357BD3FF77E, 0xA2D12E251F74F645, + 0x66FD9E525E81A082, 0x2E0C90CE7F687A49, + 0xC2E8BCBEBA973BC5, 0x000001BCE509745F, + 0x423777BBE6DAB3D6, 0xD1661C7EAEF06EB5, + 0xA1781F354DAACFD8, 0x2D11284A2B16AFFC, + 0xF1FC4F67FA891D1F, 0x73ECC25DCB920ADA, + 0xAE610C22C2A12651, 0x96E0A810D356B78A, + 0x5A9A381F2FE7870F, 0xD5AD62EDE94E5530, + 0xD225E5E8368D1427, 0x65977B70C7AF4631, + 0x99F889B2DE39D74F, 0x233F30BF54E1D143, + 0x9A9675D3D9A63C97, 0x5470554FF334F9A8, + 0x166ACB744A4F5688, 0x70C74CAAB2E4AEAD, + 0xF0D091646F294D12, 0x57B82A89684031D1, + 0xEFD95A5A61BE0B6B, 0x2FBD12E969F2F29A, + 0x9BD37013FEFF9FE8, 0x3F9B0404D6085A06, + 0x4940C1F3166CFE15, 0x09542C4DCDF3DEFB, + 0xB4C5218385CD5CE3, 0xC935B7DC4462A641, + 0x3417F8A68ED3B63F, 0xB80959295B215B40, + 0xF99CDAEF3B8C8572, 0x018C0614F8FCB95D, + 0x1B14ACCD1A3ACDF3, 0x84D471F200BB732D, + 0xC1A3110E95E8DA16, 0x430A7220BF1A82B8, + 0xB77E090D39DF210E, 0x5EF4BD9F3CD05E9D, + 0x9D4FF6DA7E57A444, 0xDA1D60E183D4A5F8, + 0xB287C38417998E47, 0xFE3EDC121BB31886, + 0xC7FE3CCC980CCBEF, 0xE46FB590189BFD03, + 0x3732FD469A4C57DC, 0x7EF700A07CF1AD65, + 0x59C64468A31D8859, 0x762FB0B4D45B61F6, + 0x155BAED099047718, 0x68755E4C3D50BAA6, + 0xE9214E7F22D8B4DF, 0x2ADDBF532EAC95F4, + 0x32AE3909B4BD0109, 0x834DF537B08E3450, + 0xFA209DA84220728D, 0x9E691D9B9EFE23F7, + 0x0446D288C4AE8D7F, 0x7B4CC524E169785B, + 0x21D87F0135CA1385, 0xCEBB400F137B8AA5, + 0x272E2B66580796BE, 0x3612264125C2B0DE, + 0x057702BDAD1EFBB2, 0xD4BABB8EACF84BE9, + 0x91583139641BC67B, 0x8BDC2DE08036E024, + 0x603C8156F49F68ED, 0xF7D236F7DBEF5111, + 0x9727C4598AD21E80, 0xA08A0896670A5FD7, + 0xCB4A8F4309EBA9CB, 0x81AF564B0F7036A1, + 0xC0B99AA778199ABD, 0x959F1EC83FC8E952, + 0x8C505077794A81B9, 0x3ACAAF8F056338F0, + 0x07B43F50627A6778, 0x4A44AB49F5ECCC77, + 0x3BC3D6E4B679EE98, 0x9CC0D4D1CF14108C, + 0x4406C00B206BC8A0, 0x82A18854C8D72D89, + 0x67E366B35C3C432C, 0xB923DD61102B37F2, + 0x56AB2779D884271D, 0xBE83E1B0FF1525AF, + 0xFB7C65D4217E49A9, 0x6BDBE0E76D48E7D4, + 0x08DF828745D9179E, 0x22EA6A9ADD53BD34, + 0xE36E141C5622200A, 0x7F805D1B8CB750EE, + 0xAFE5C7A59F58E837, 0xE27F996A4FB1C23C, + 0xD3867DFB0775F0D0, 0xD0E673DE6E88891A, + 0x123AEB9EAFB86C25, 0x30F1D5D5C145B895, + 0xBB434A2DEE7269E7, 0x78CB67ECF931FA38, + 0xF33B0372323BBF9C, 0x52D66336FB279C74, + 0x505F33AC0AFB4EAA, 0xE8A5CD99A2CCE187, + 0x534974801E2D30BB, 0x8D2D5711D5876D90, + 0x1F1A412891BC038E, 0xD6E2E71D82E56648, + 0x74036C3A497732B7, 0x89B67ED96361F5AB, + 0xFFED95D8F1EA02A2, 0xE72B3BD61464D43D, + 0xA6300F170BDC4820, 0xEBC18760ED78A77A] + +t2 = [0xE6A6BE5A05A12138, 0xB5A122A5B4F87C98, + 0x563C6089140B6990, 0x4C46CB2E391F5DD5, + 0xD932ADDBC9B79434, 0x08EA70E42015AFF5, + 0xD765A6673E478CF1, 0xC4FB757EAB278D99, + 0xDF11C6862D6E0692, 0xDDEB84F10D7F3B16, + 0x6F2EF604A665EA04, 0x4A8E0F0FF0E0DFB3, + 0xA5EDEEF83DBCBA51, 0xFC4F0A2A0EA4371E, + 0xE83E1DA85CB38429, 0xDC8FF882BA1B1CE2, + 0xCD45505E8353E80D, 0x18D19A00D4DB0717, + 0x34A0CFEDA5F38101, 0x0BE77E518887CAF2, + 0x1E341438B3C45136, 0xE05797F49089CCF9, + 0xFFD23F9DF2591D14, 0x543DDA228595C5CD, + 0x661F81FD99052A33, 0x8736E641DB0F7B76, + 0x15227725418E5307, 0xE25F7F46162EB2FA, + 0x48A8B2126C13D9FE, 0xAFDC541792E76EEA, + 0x03D912BFC6D1898F, 0x31B1AAFA1B83F51B, + 0xF1AC2796E42AB7D9, 0x40A3A7D7FCD2EBAC, + 0x1056136D0AFBBCC5, 0x7889E1DD9A6D0C85, + 0xD33525782A7974AA, 0xA7E25D09078AC09B, + 0xBD4138B3EAC6EDD0, 0x920ABFBE71EB9E70, + 0xA2A5D0F54FC2625C, 0xC054E36B0B1290A3, + 0xF6DD59FF62FE932B, 0x3537354511A8AC7D, + 0xCA845E9172FADCD4, 0x84F82B60329D20DC, + 0x79C62CE1CD672F18, 0x8B09A2ADD124642C, + 0xD0C1E96A19D9E726, 0x5A786A9B4BA9500C, + 0x0E020336634C43F3, 0xC17B474AEB66D822, + 0x6A731AE3EC9BAAC2, 0x8226667AE0840258, + 0x67D4567691CAECA5, 0x1D94155C4875ADB5, + 0x6D00FD985B813FDF, 0x51286EFCB774CD06, + 0x5E8834471FA744AF, 0xF72CA0AEE761AE2E, + 0xBE40E4CDAEE8E09A, 0xE9970BBB5118F665, + 0x726E4BEB33DF1964, 0x703B000729199762, + 0x4631D816F5EF30A7, 0xB880B5B51504A6BE, + 0x641793C37ED84B6C, 0x7B21ED77F6E97D96, + 0x776306312EF96B73, 0xAE528948E86FF3F4, + 0x53DBD7F286A3F8F8, 0x16CADCE74CFC1063, + 0x005C19BDFA52C6DD, 0x68868F5D64D46AD3, + 0x3A9D512CCF1E186A, 0x367E62C2385660AE, + 0xE359E7EA77DCB1D7, 0x526C0773749ABE6E, + 0x735AE5F9D09F734B, 0x493FC7CC8A558BA8, + 0xB0B9C1533041AB45, 0x321958BA470A59BD, + 0x852DB00B5F46C393, 0x91209B2BD336B0E5, + 0x6E604F7D659EF19F, 0xB99A8AE2782CCB24, + 0xCCF52AB6C814C4C7, 0x4727D9AFBE11727B, + 0x7E950D0C0121B34D, 0x756F435670AD471F, + 0xF5ADD442615A6849, 0x4E87E09980B9957A, + 0x2ACFA1DF50AEE355, 0xD898263AFD2FD556, + 0xC8F4924DD80C8FD6, 0xCF99CA3D754A173A, + 0xFE477BACAF91BF3C, 0xED5371F6D690C12D, + 0x831A5C285E687094, 0xC5D3C90A3708A0A4, + 0x0F7F903717D06580, 0x19F9BB13B8FDF27F, + 0xB1BD6F1B4D502843, 0x1C761BA38FFF4012, + 0x0D1530C4E2E21F3B, 0x8943CE69A7372C8A, + 0xE5184E11FEB5CE66, 0x618BDB80BD736621, + 0x7D29BAD68B574D0B, 0x81BB613E25E6FE5B, + 0x071C9C10BC07913F, 0xC7BEEB7909AC2D97, + 0xC3E58D353BC5D757, 0xEB017892F38F61E8, + 0xD4EFFB9C9B1CC21A, 0x99727D26F494F7AB, + 0xA3E063A2956B3E03, 0x9D4A8B9A4AA09C30, + 0x3F6AB7D500090FB4, 0x9CC0F2A057268AC0, + 0x3DEE9D2DEDBF42D1, 0x330F49C87960A972, + 0xC6B2720287421B41, 0x0AC59EC07C00369C, + 0xEF4EAC49CB353425, 0xF450244EEF0129D8, + 0x8ACC46E5CAF4DEB6, 0x2FFEAB63989263F7, + 0x8F7CB9FE5D7A4578, 0x5BD8F7644E634635, + 0x427A7315BF2DC900, 0x17D0C4AA2125261C, + 0x3992486C93518E50, 0xB4CBFEE0A2D7D4C3, + 0x7C75D6202C5DDD8D, 0xDBC295D8E35B6C61, + 0x60B369D302032B19, 0xCE42685FDCE44132, + 0x06F3DDB9DDF65610, 0x8EA4D21DB5E148F0, + 0x20B0FCE62FCD496F, 0x2C1B912358B0EE31, + 0xB28317B818F5A308, 0xA89C1E189CA6D2CF, + 0x0C6B18576AAADBC8, 0xB65DEAA91299FAE3, + 0xFB2B794B7F1027E7, 0x04E4317F443B5BEB, + 0x4B852D325939D0A6, 0xD5AE6BEEFB207FFC, + 0x309682B281C7D374, 0xBAE309A194C3B475, + 0x8CC3F97B13B49F05, 0x98A9422FF8293967, + 0x244B16B01076FF7C, 0xF8BF571C663D67EE, + 0x1F0D6758EEE30DA1, 0xC9B611D97ADEB9B7, + 0xB7AFD5887B6C57A2, 0x6290AE846B984FE1, + 0x94DF4CDEACC1A5FD, 0x058A5BD1C5483AFF, + 0x63166CC142BA3C37, 0x8DB8526EB2F76F40, + 0xE10880036F0D6D4E, 0x9E0523C9971D311D, + 0x45EC2824CC7CD691, 0x575B8359E62382C9, + 0xFA9E400DC4889995, 0xD1823ECB45721568, + 0xDAFD983B8206082F, 0xAA7D29082386A8CB, + 0x269FCD4403B87588, 0x1B91F5F728BDD1E0, + 0xE4669F39040201F6, 0x7A1D7C218CF04ADE, + 0x65623C29D79CE5CE, 0x2368449096C00BB1, + 0xAB9BF1879DA503BA, 0xBC23ECB1A458058E, + 0x9A58DF01BB401ECC, 0xA070E868A85F143D, + 0x4FF188307DF2239E, 0x14D565B41A641183, + 0xEE13337452701602, 0x950E3DCF3F285E09, + 0x59930254B9C80953, 0x3BF299408930DA6D, + 0xA955943F53691387, 0xA15EDECAA9CB8784, + 0x29142127352BE9A0, 0x76F0371FFF4E7AFB, + 0x0239F450274F2228, 0xBB073AF01D5E868B, + 0xBFC80571C10E96C1, 0xD267088568222E23, + 0x9671A3D48E80B5B0, 0x55B5D38AE193BB81, + 0x693AE2D0A18B04B8, 0x5C48B4ECADD5335F, + 0xFD743B194916A1CA, 0x2577018134BE98C4, + 0xE77987E83C54A4AD, 0x28E11014DA33E1B9, + 0x270CC59E226AA213, 0x71495F756D1A5F60, + 0x9BE853FB60AFEF77, 0xADC786A7F7443DBF, + 0x0904456173B29A82, 0x58BC7A66C232BD5E, + 0xF306558C673AC8B2, 0x41F639C6B6C9772A, + 0x216DEFE99FDA35DA, 0x11640CC71C7BE615, + 0x93C43694565C5527, 0xEA038E6246777839, + 0xF9ABF3CE5A3E2469, 0x741E768D0FD312D2, + 0x0144B883CED652C6, 0xC20B5A5BA33F8552, + 0x1AE69633C3435A9D, 0x97A28CA4088CFDEC, + 0x8824A43C1E96F420, 0x37612FA66EEEA746, + 0x6B4CB165F9CF0E5A, 0x43AA1C06A0ABFB4A, + 0x7F4DC26FF162796B, 0x6CBACC8E54ED9B0F, + 0xA6B7FFEFD2BB253E, 0x2E25BC95B0A29D4F, + 0x86D6A58BDEF1388C, 0xDED74AC576B6F054, + 0x8030BDBC2B45805D, 0x3C81AF70E94D9289, + 0x3EFF6DDA9E3100DB, 0xB38DC39FDFCC8847, + 0x123885528D17B87E, 0xF2DA0ED240B1B642, + 0x44CEFADCD54BF9A9, 0x1312200E433C7EE6, + 0x9FFCC84F3A78C748, 0xF0CD1F72248576BB, + 0xEC6974053638CFE4, 0x2BA7B67C0CEC4E4C, + 0xAC2F4DF3E5CE32ED, 0xCB33D14326EA4C11, + 0xA4E9044CC77E58BC, 0x5F513293D934FCEF, + 0x5DC9645506E55444, 0x50DE418F317DE40A, + 0x388CB31A69DDE259, 0x2DB4A83455820A86, + 0x9010A91E84711AE9, 0x4DF7F0B7B1498371, + 0xD62A2EABC0977179, 0x22FAC097AA8D5C0E] + +t3 = [0xF49FCC2FF1DAF39B, 0x487FD5C66FF29281, + 0xE8A30667FCDCA83F, 0x2C9B4BE3D2FCCE63, + 0xDA3FF74B93FBBBC2, 0x2FA165D2FE70BA66, + 0xA103E279970E93D4, 0xBECDEC77B0E45E71, + 0xCFB41E723985E497, 0xB70AAA025EF75017, + 0xD42309F03840B8E0, 0x8EFC1AD035898579, + 0x96C6920BE2B2ABC5, 0x66AF4163375A9172, + 0x2174ABDCCA7127FB, 0xB33CCEA64A72FF41, + 0xF04A4933083066A5, 0x8D970ACDD7289AF5, + 0x8F96E8E031C8C25E, 0xF3FEC02276875D47, + 0xEC7BF310056190DD, 0xF5ADB0AEBB0F1491, + 0x9B50F8850FD58892, 0x4975488358B74DE8, + 0xA3354FF691531C61, 0x0702BBE481D2C6EE, + 0x89FB24057DEDED98, 0xAC3075138596E902, + 0x1D2D3580172772ED, 0xEB738FC28E6BC30D, + 0x5854EF8F63044326, 0x9E5C52325ADD3BBE, + 0x90AA53CF325C4623, 0xC1D24D51349DD067, + 0x2051CFEEA69EA624, 0x13220F0A862E7E4F, + 0xCE39399404E04864, 0xD9C42CA47086FCB7, + 0x685AD2238A03E7CC, 0x066484B2AB2FF1DB, + 0xFE9D5D70EFBF79EC, 0x5B13B9DD9C481854, + 0x15F0D475ED1509AD, 0x0BEBCD060EC79851, + 0xD58C6791183AB7F8, 0xD1187C5052F3EEE4, + 0xC95D1192E54E82FF, 0x86EEA14CB9AC6CA2, + 0x3485BEB153677D5D, 0xDD191D781F8C492A, + 0xF60866BAA784EBF9, 0x518F643BA2D08C74, + 0x8852E956E1087C22, 0xA768CB8DC410AE8D, + 0x38047726BFEC8E1A, 0xA67738B4CD3B45AA, + 0xAD16691CEC0DDE19, 0xC6D4319380462E07, + 0xC5A5876D0BA61938, 0x16B9FA1FA58FD840, + 0x188AB1173CA74F18, 0xABDA2F98C99C021F, + 0x3E0580AB134AE816, 0x5F3B05B773645ABB, + 0x2501A2BE5575F2F6, 0x1B2F74004E7E8BA9, + 0x1CD7580371E8D953, 0x7F6ED89562764E30, + 0xB15926FF596F003D, 0x9F65293DA8C5D6B9, + 0x6ECEF04DD690F84C, 0x4782275FFF33AF88, + 0xE41433083F820801, 0xFD0DFE409A1AF9B5, + 0x4325A3342CDB396B, 0x8AE77E62B301B252, + 0xC36F9E9F6655615A, 0x85455A2D92D32C09, + 0xF2C7DEA949477485, 0x63CFB4C133A39EBA, + 0x83B040CC6EBC5462, 0x3B9454C8FDB326B0, + 0x56F56A9E87FFD78C, 0x2DC2940D99F42BC6, + 0x98F7DF096B096E2D, 0x19A6E01E3AD852BF, + 0x42A99CCBDBD4B40B, 0xA59998AF45E9C559, + 0x366295E807D93186, 0x6B48181BFAA1F773, + 0x1FEC57E2157A0A1D, 0x4667446AF6201AD5, + 0xE615EBCACFB0F075, 0xB8F31F4F68290778, + 0x22713ED6CE22D11E, 0x3057C1A72EC3C93B, + 0xCB46ACC37C3F1F2F, 0xDBB893FD02AAF50E, + 0x331FD92E600B9FCF, 0xA498F96148EA3AD6, + 0xA8D8426E8B6A83EA, 0xA089B274B7735CDC, + 0x87F6B3731E524A11, 0x118808E5CBC96749, + 0x9906E4C7B19BD394, 0xAFED7F7E9B24A20C, + 0x6509EADEEB3644A7, 0x6C1EF1D3E8EF0EDE, + 0xB9C97D43E9798FB4, 0xA2F2D784740C28A3, + 0x7B8496476197566F, 0x7A5BE3E6B65F069D, + 0xF96330ED78BE6F10, 0xEEE60DE77A076A15, + 0x2B4BEE4AA08B9BD0, 0x6A56A63EC7B8894E, + 0x02121359BA34FEF4, 0x4CBF99F8283703FC, + 0x398071350CAF30C8, 0xD0A77A89F017687A, + 0xF1C1A9EB9E423569, 0x8C7976282DEE8199, + 0x5D1737A5DD1F7ABD, 0x4F53433C09A9FA80, + 0xFA8B0C53DF7CA1D9, 0x3FD9DCBC886CCB77, + 0xC040917CA91B4720, 0x7DD00142F9D1DCDF, + 0x8476FC1D4F387B58, 0x23F8E7C5F3316503, + 0x032A2244E7E37339, 0x5C87A5D750F5A74B, + 0x082B4CC43698992E, 0xDF917BECB858F63C, + 0x3270B8FC5BF86DDA, 0x10AE72BB29B5DD76, + 0x576AC94E7700362B, 0x1AD112DAC61EFB8F, + 0x691BC30EC5FAA427, 0xFF246311CC327143, + 0x3142368E30E53206, 0x71380E31E02CA396, + 0x958D5C960AAD76F1, 0xF8D6F430C16DA536, + 0xC8FFD13F1BE7E1D2, 0x7578AE66004DDBE1, + 0x05833F01067BE646, 0xBB34B5AD3BFE586D, + 0x095F34C9A12B97F0, 0x247AB64525D60CA8, + 0xDCDBC6F3017477D1, 0x4A2E14D4DECAD24D, + 0xBDB5E6D9BE0A1EEB, 0x2A7E70F7794301AB, + 0xDEF42D8A270540FD, 0x01078EC0A34C22C1, + 0xE5DE511AF4C16387, 0x7EBB3A52BD9A330A, + 0x77697857AA7D6435, 0x004E831603AE4C32, + 0xE7A21020AD78E312, 0x9D41A70C6AB420F2, + 0x28E06C18EA1141E6, 0xD2B28CBD984F6B28, + 0x26B75F6C446E9D83, 0xBA47568C4D418D7F, + 0xD80BADBFE6183D8E, 0x0E206D7F5F166044, + 0xE258A43911CBCA3E, 0x723A1746B21DC0BC, + 0xC7CAA854F5D7CDD3, 0x7CAC32883D261D9C, + 0x7690C26423BA942C, 0x17E55524478042B8, + 0xE0BE477656A2389F, 0x4D289B5E67AB2DA0, + 0x44862B9C8FBBFD31, 0xB47CC8049D141365, + 0x822C1B362B91C793, 0x4EB14655FB13DFD8, + 0x1ECBBA0714E2A97B, 0x6143459D5CDE5F14, + 0x53A8FBF1D5F0AC89, 0x97EA04D81C5E5B00, + 0x622181A8D4FDB3F3, 0xE9BCD341572A1208, + 0x1411258643CCE58A, 0x9144C5FEA4C6E0A4, + 0x0D33D06565CF620F, 0x54A48D489F219CA1, + 0xC43E5EAC6D63C821, 0xA9728B3A72770DAF, + 0xD7934E7B20DF87EF, 0xE35503B61A3E86E5, + 0xCAE321FBC819D504, 0x129A50B3AC60BFA6, + 0xCD5E68EA7E9FB6C3, 0xB01C90199483B1C7, + 0x3DE93CD5C295376C, 0xAED52EDF2AB9AD13, + 0x2E60F512C0A07884, 0xBC3D86A3E36210C9, + 0x35269D9B163951CE, 0x0C7D6E2AD0CDB5FA, + 0x59E86297D87F5733, 0x298EF221898DB0E7, + 0x55000029D1A5AA7E, 0x8BC08AE1B5061B45, + 0xC2C31C2B6C92703A, 0x94CC596BAF25EF42, + 0x0A1D73DB22540456, 0x04B6A0F9D9C4179A, + 0xEFFDAFA2AE3D3C60, 0xF7C8075BB49496C4, + 0x9CC5C7141D1CD4E3, 0x78BD1638218E5534, + 0xB2F11568F850246A, 0xEDFABCFA9502BC29, + 0x796CE5F2DA23051B, 0xAAE128B0DC93537C, + 0x3A493DA0EE4B29AE, 0xB5DF6B2C416895D7, + 0xFCABBD25122D7F37, 0x70810B58105DC4B1, + 0xE10FDD37F7882A90, 0x524DCAB5518A3F5C, + 0x3C9E85878451255B, 0x4029828119BD34E2, + 0x74A05B6F5D3CECCB, 0xB610021542E13ECA, + 0x0FF979D12F59E2AC, 0x6037DA27E4F9CC50, + 0x5E92975A0DF1847D, 0xD66DE190D3E623FE, + 0x5032D6B87B568048, 0x9A36B7CE8235216E, + 0x80272A7A24F64B4A, 0x93EFED8B8C6916F7, + 0x37DDBFF44CCE1555, 0x4B95DB5D4B99BD25, + 0x92D3FDA169812FC0, 0xFB1A4A9A90660BB6, + 0x730C196946A4B9B2, 0x81E289AA7F49DA68, + 0x64669A0F83B1A05F, 0x27B3FF7D9644F48B, + 0xCC6B615C8DB675B3, 0x674F20B9BCEBBE95, + 0x6F31238275655982, 0x5AE488713E45CF05, + 0xBF619F9954C21157, 0xEABAC46040A8EAE9, + 0x454C6FE9F2C0C1CD, 0x419CF6496412691C, + 0xD3DC3BEF265B0F70, 0x6D0E60F5C3578A9E] + +t4 = [0x5B0E608526323C55, 0x1A46C1A9FA1B59F5, + 0xA9E245A17C4C8FFA, 0x65CA5159DB2955D7, + 0x05DB0A76CE35AFC2, 0x81EAC77EA9113D45, + 0x528EF88AB6AC0A0D, 0xA09EA253597BE3FF, + 0x430DDFB3AC48CD56, 0xC4B3A67AF45CE46F, + 0x4ECECFD8FBE2D05E, 0x3EF56F10B39935F0, + 0x0B22D6829CD619C6, 0x17FD460A74DF2069, + 0x6CF8CC8E8510ED40, 0xD6C824BF3A6ECAA7, + 0x61243D581A817049, 0x048BACB6BBC163A2, + 0xD9A38AC27D44CC32, 0x7FDDFF5BAAF410AB, + 0xAD6D495AA804824B, 0xE1A6A74F2D8C9F94, + 0xD4F7851235DEE8E3, 0xFD4B7F886540D893, + 0x247C20042AA4BFDA, 0x096EA1C517D1327C, + 0xD56966B4361A6685, 0x277DA5C31221057D, + 0x94D59893A43ACFF7, 0x64F0C51CCDC02281, + 0x3D33BCC4FF6189DB, 0xE005CB184CE66AF1, + 0xFF5CCD1D1DB99BEA, 0xB0B854A7FE42980F, + 0x7BD46A6A718D4B9F, 0xD10FA8CC22A5FD8C, + 0xD31484952BE4BD31, 0xC7FA975FCB243847, + 0x4886ED1E5846C407, 0x28CDDB791EB70B04, + 0xC2B00BE2F573417F, 0x5C9590452180F877, + 0x7A6BDDFFF370EB00, 0xCE509E38D6D9D6A4, + 0xEBEB0F00647FA702, 0x1DCC06CF76606F06, + 0xE4D9F28BA286FF0A, 0xD85A305DC918C262, + 0x475B1D8732225F54, 0x2D4FB51668CCB5FE, + 0xA679B9D9D72BBA20, 0x53841C0D912D43A5, + 0x3B7EAA48BF12A4E8, 0x781E0E47F22F1DDF, + 0xEFF20CE60AB50973, 0x20D261D19DFFB742, + 0x16A12B03062A2E39, 0x1960EB2239650495, + 0x251C16FED50EB8B8, 0x9AC0C330F826016E, + 0xED152665953E7671, 0x02D63194A6369570, + 0x5074F08394B1C987, 0x70BA598C90B25CE1, + 0x794A15810B9742F6, 0x0D5925E9FCAF8C6C, + 0x3067716CD868744E, 0x910AB077E8D7731B, + 0x6A61BBDB5AC42F61, 0x93513EFBF0851567, + 0xF494724B9E83E9D5, 0xE887E1985C09648D, + 0x34B1D3C675370CFD, 0xDC35E433BC0D255D, + 0xD0AAB84234131BE0, 0x08042A50B48B7EAF, + 0x9997C4EE44A3AB35, 0x829A7B49201799D0, + 0x263B8307B7C54441, 0x752F95F4FD6A6CA6, + 0x927217402C08C6E5, 0x2A8AB754A795D9EE, + 0xA442F7552F72943D, 0x2C31334E19781208, + 0x4FA98D7CEAEE6291, 0x55C3862F665DB309, + 0xBD0610175D53B1F3, 0x46FE6CB840413F27, + 0x3FE03792DF0CFA59, 0xCFE700372EB85E8F, + 0xA7BE29E7ADBCE118, 0xE544EE5CDE8431DD, + 0x8A781B1B41F1873E, 0xA5C94C78A0D2F0E7, + 0x39412E2877B60728, 0xA1265EF3AFC9A62C, + 0xBCC2770C6A2506C5, 0x3AB66DD5DCE1CE12, + 0xE65499D04A675B37, 0x7D8F523481BFD216, + 0x0F6F64FCEC15F389, 0x74EFBE618B5B13C8, + 0xACDC82B714273E1D, 0xDD40BFE003199D17, + 0x37E99257E7E061F8, 0xFA52626904775AAA, + 0x8BBBF63A463D56F9, 0xF0013F1543A26E64, + 0xA8307E9F879EC898, 0xCC4C27A4150177CC, + 0x1B432F2CCA1D3348, 0xDE1D1F8F9F6FA013, + 0x606602A047A7DDD6, 0xD237AB64CC1CB2C7, + 0x9B938E7225FCD1D3, 0xEC4E03708E0FF476, + 0xFEB2FBDA3D03C12D, 0xAE0BCED2EE43889A, + 0x22CB8923EBFB4F43, 0x69360D013CF7396D, + 0x855E3602D2D4E022, 0x073805BAD01F784C, + 0x33E17A133852F546, 0xDF4874058AC7B638, + 0xBA92B29C678AA14A, 0x0CE89FC76CFAADCD, + 0x5F9D4E0908339E34, 0xF1AFE9291F5923B9, + 0x6E3480F60F4A265F, 0xEEBF3A2AB29B841C, + 0xE21938A88F91B4AD, 0x57DFEFF845C6D3C3, + 0x2F006B0BF62CAAF2, 0x62F479EF6F75EE78, + 0x11A55AD41C8916A9, 0xF229D29084FED453, + 0x42F1C27B16B000E6, 0x2B1F76749823C074, + 0x4B76ECA3C2745360, 0x8C98F463B91691BD, + 0x14BCC93CF1ADE66A, 0x8885213E6D458397, + 0x8E177DF0274D4711, 0xB49B73B5503F2951, + 0x10168168C3F96B6B, 0x0E3D963B63CAB0AE, + 0x8DFC4B5655A1DB14, 0xF789F1356E14DE5C, + 0x683E68AF4E51DAC1, 0xC9A84F9D8D4B0FD9, + 0x3691E03F52A0F9D1, 0x5ED86E46E1878E80, + 0x3C711A0E99D07150, 0x5A0865B20C4E9310, + 0x56FBFC1FE4F0682E, 0xEA8D5DE3105EDF9B, + 0x71ABFDB12379187A, 0x2EB99DE1BEE77B9C, + 0x21ECC0EA33CF4523, 0x59A4D7521805C7A1, + 0x3896F5EB56AE7C72, 0xAA638F3DB18F75DC, + 0x9F39358DABE9808E, 0xB7DEFA91C00B72AC, + 0x6B5541FD62492D92, 0x6DC6DEE8F92E4D5B, + 0x353F57ABC4BEEA7E, 0x735769D6DA5690CE, + 0x0A234AA642391484, 0xF6F9508028F80D9D, + 0xB8E319A27AB3F215, 0x31AD9C1151341A4D, + 0x773C22A57BEF5805, 0x45C7561A07968633, + 0xF913DA9E249DBE36, 0xDA652D9B78A64C68, + 0x4C27A97F3BC334EF, 0x76621220E66B17F4, + 0x967743899ACD7D0B, 0xF3EE5BCAE0ED6782, + 0x409F753600C879FC, 0x06D09A39B5926DB6, + 0x6F83AEB0317AC588, 0x01E6CA4A86381F21, + 0x66FF3462D19F3025, 0x72207C24DDFD3BFB, + 0x4AF6B6D3E2ECE2EB, 0x9C994DBEC7EA08DE, + 0x49ACE597B09A8BC4, 0xB38C4766CF0797BA, + 0x131B9373C57C2A75, 0xB1822CCE61931E58, + 0x9D7555B909BA1C0C, 0x127FAFDD937D11D2, + 0x29DA3BADC66D92E4, 0xA2C1D57154C2ECBC, + 0x58C5134D82F6FE24, 0x1C3AE3515B62274F, + 0xE907C82E01CB8126, 0xF8ED091913E37FCB, + 0x3249D8F9C80046C9, 0x80CF9BEDE388FB63, + 0x1881539A116CF19E, 0x5103F3F76BD52457, + 0x15B7E6F5AE47F7A8, 0xDBD7C6DED47E9CCF, + 0x44E55C410228BB1A, 0xB647D4255EDB4E99, + 0x5D11882BB8AAFC30, 0xF5098BBB29D3212A, + 0x8FB5EA14E90296B3, 0x677B942157DD025A, + 0xFB58E7C0A390ACB5, 0x89D3674C83BD4A01, + 0x9E2DA4DF4BF3B93B, 0xFCC41E328CAB4829, + 0x03F38C96BA582C52, 0xCAD1BDBD7FD85DB2, + 0xBBB442C16082AE83, 0xB95FE86BA5DA9AB0, + 0xB22E04673771A93F, 0x845358C9493152D8, + 0xBE2A488697B4541E, 0x95A2DC2DD38E6966, + 0xC02C11AC923C852B, 0x2388B1990DF2A87B, + 0x7C8008FA1B4F37BE, 0x1F70D0C84D54E503, + 0x5490ADEC7ECE57D4, 0x002B3C27D9063A3A, + 0x7EAEA3848030A2BF, 0xC602326DED2003C0, + 0x83A7287D69A94086, 0xC57A5FCB30F57A8A, + 0xB56844E479EBE779, 0xA373B40F05DCBCE9, + 0xD71A786E88570EE2, 0x879CBACDBDE8F6A0, + 0x976AD1BCC164A32F, 0xAB21E25E9666D78B, + 0x901063AAE5E5C33C, 0x9818B34448698D90, + 0xE36487AE3E1E8ABB, 0xAFBDF931893BDCB4, + 0x6345A0DC5FBBD519, 0x8628FE269B9465CA, + 0x1E5D01603F9C51EC, 0x4DE44006A15049B7, + 0xBF6C70E5F776CBB1, 0x411218F2EF552BED, + 0xCB0C0708705A36A3, 0xE74D14754F986044, + 0xCD56D9430EA8280E, 0xC12591D7535F5065, + 0xC83223F1720AEF96, 0xC3A0396F7363A51F] \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/registry/hashing/tiger.py b/tools/blenvy/add_ons/bevy_components/registry/hashing/tiger.py new file mode 100644 index 0000000..cf83392 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/registry/hashing/tiger.py @@ -0,0 +1,103 @@ +import struct +from .sboxes import t1, t2, t3, t4 + +def tiger_round(abc, order, x, mul): + abc[order[2]] ^= x + abc[order[2]] &= 0xffffffffffffffff + abc[order[0]] -= t1[((abc[order[2]]) >> (0*8))&0xFF] ^ t2[((abc[order[2]]) >> ( 2*8)) & 0xFF] ^ t3[((abc[order[2]]) >> (4*8))&0xFF] ^ t4[((abc[order[2]]) >> ( 6*8)) & 0xFF] + abc[order[1]] += t4[((abc[order[2]]) >> (1*8))&0xFF] ^ t3[((abc[order[2]]) >> ( 3*8)) & 0xFF] ^ t2[((abc[order[2]]) >> (5*8))&0xFF] ^ t1[((abc[order[2]]) >> ( 7*8)) & 0xFF] + abc[order[1]] *= mul + abc[order[0]] &= 0xffffffffffffffff + abc[order[1]] &= 0xffffffffffffffff + abc[order[2]] &= 0xffffffffffffffff + return abc + +def tiger_pass(abc, mul, mystr): + abc = tiger_round(abc, (0, 1, 2), mystr[0], mul) + abc = tiger_round(abc, (1, 2, 0), mystr[1], mul) + abc = tiger_round(abc, (2, 0, 1), mystr[2], mul) + abc = tiger_round(abc, (0, 1, 2), mystr[3], mul) + abc = tiger_round(abc, (1, 2, 0), mystr[4], mul) + abc = tiger_round(abc, (2, 0, 1), mystr[5], mul) + abc = tiger_round(abc, (0, 1, 2), mystr[6], mul) + abc = tiger_round(abc, (1, 2, 0), mystr[7], mul) + return abc + +def tiger_compress(string, res): + a = aa = res[0] + b = bb = res[1] + c = cc = res[2] + + x = [] + for i in range(8): + x.append(int.from_bytes(string[i*8:i*8+8], byteorder='little')) + + allf = 0xFFFFFFFFFFFFFFFF + for i in range(0, 3): + if i != 0: + x[0] = (x[0] - (x[7] ^ 0xA5A5A5A5A5A5A5A5)&allf ) & allf + x[1] ^= x[0] + x[2] = (x[2] + x[1]) & allf + x[3] = (x[3] - (x[2] ^ (~x[1]&allf) << 19)&allf) & allf + x[4] ^= x[3] + x[5] = (x[5] + x[4]) & allf + x[6] = (x[6] - (x[5] ^ (~x[4]&allf) >> 23)&allf) & allf + x[7] ^= x[6] + x[0] = (x[0] + x[7]) & allf + x[1] = (x[1] - (x[0] ^ (~x[7]&allf) << 19)&allf) & allf + x[2] ^= x[1] + x[3] = (x[3] + x[2]) & allf + x[4] = (x[4] - (x[3] ^ (~x[2]&allf) >> 23)&allf) & allf + x[5] ^= x[4] + x[6] = (x[6] + x[5]) & allf + x[7] = (x[7] - (x[6] ^ 0x0123456789ABCDEF)&allf ) & allf + + if i == 0: + a, b, c = tiger_pass([a, b, c],5, x) + elif i == 1: + a, b, c = tiger_pass([a, b, c],7, x) + else: + a, b, c = tiger_pass([a, b, c],9, x) + a, b, c = c, a, b + res[0] = a^aa + res[1] = (b - bb) & allf + res[2] = (c + cc) & allf + +def hash(string): + string = bytearray(string.encode()) + i = 0 + + res = [0x0123456789ABCDEF, 0xFEDCBA9876543210, 0xF096A5B4C3B2E187] + offset = 0 + length = len(string) + while i < length-63: + tiger_compress( string[i:i+64], res ) + i += 64 + temp = string[i:] + j = len(temp) + temp.append(1) + j += 1 + + while j&7 != 0: + temp.append(0) + j += 1 + + if j > 56: + while j < 64: + temp.append(0) + j += 1 + tiger_compress(temp, res) + j = 0 + + # make the first 56 bytes 0 + temp.extend([0 for i in range(0, 56-j)]) + while j < 56: + temp[j] = 0 + j += 1 + while len(temp) > 56: + temp.pop(56) + temp.extend(struct.pack('": dict(type=StringProperty, presets=dict()), - "enum": dict(type=EnumProperty, presets=dict()), 'bevy_ecs::entity::Entity': {"type": IntProperty, "presets": {"min":0} }, 'bevy_utils::Uuid': dict(type=StringProperty, presets=dict()), - } - value_types_defaults = { "string":" ", "boolean": True, @@ -207,7 +143,7 @@ class ComponentsRegistry(PropertyGroup): "bevy_color::srgba::Srgba": [1.0, 1.0, 0.0, 1.0], "bevy_color::linear_rgba::LinearRgba": [1.0, 1.0, 0.0, 1.0], "bevy_color::hsva::Hsva": [1.0, 1.0, 0.0, 1.0], - + 'bevy_ecs::entity::Entity': 0,#4294967295, # this is the same as Bevy's Entity::Placeholder, too big for Blender..sigh 'bevy_utils::Uuid': '"'+str(uuid.uuid4())+'"' @@ -216,66 +152,59 @@ class ComponentsRegistry(PropertyGroup): type_infos = {} type_infos_missing = [] component_propertyGroups = {} - short_names_to_long_names = {} + component_property_group_classes = [] + custom_types_to_add = {} invalid_components = [] @classmethod def register(cls): bpy.types.WindowManager.components_registry = PointerProperty(type=ComponentsRegistry) - bpy.context.window_manager.components_registry.watcher_active = False @classmethod def unregister(cls): - bpy.context.window_manager.components_registry.watcher_active = False - for propgroup_name in cls.component_propertyGroups.keys(): try: delattr(ComponentMetadata, propgroup_name) - #print("unregistered propertyGroup", propgroup_name) + #print("sucess REMOVAL from Metadata") except Exception as error: pass - #print("failed to remove", error, "ComponentMetadata") - - try: - bpy.app.timers.unregister(watch_schema) - except Exception as error: - print("failed to unregister", error) - pass + #print("failed to unregister") + for propgroup_class in cls.component_property_group_classes: + try: + bpy.utils.unregister_class(propgroup_class) + #print("sucess UNREGISTER") + except Exception as error: + pass + #print("NEW failed to unregister") + del bpy.types.WindowManager.components_registry def load_schema(self): print("load schema", self) + blenvy = bpy.context.window_manager.blenvy + component_settings = blenvy.components + # cleanup previous data if any - self.propGroupIdCounter = 0 - self.short_names_to_propgroup_names.clear() + self.long_names_to_propgroup_names.clear() self.missing_types_list.clear() self.type_infos.clear() self.type_infos_missing.clear() + self.component_propertyGroups.clear() - self.short_names_to_long_names.clear() + self.component_property_group_classes.clear() + self.custom_types_to_add.clear() self.invalid_components.clear() - # now prepare paths to load data - file_path = bpy.data.filepath - # Get the folder - folder_path = os.path.dirname(file_path) - path = os.path.join(folder_path, self.schemaPath) - self.schemaFullPath = path - f = Path(bpy.path.abspath(path)) # make a path object of abs path - with open(path) as f: + with open(component_settings.schema_path_full) as f: data = json.load(f) defs = data["$defs"] self.registry = json.dumps(defs) # FIXME:meh ? - # start timer - if not self.watcher_active and self.watcher_enabled: - self.watcher_active = True - print("registering function", watch_schema) - bpy.app.timers.register(watch_schema) + component_settings.start_schema_watcher() # we load the json once, so we do not need to do it over & over again @@ -286,74 +215,59 @@ class ComponentsRegistry(PropertyGroup): def has_type_infos(self): return len(self.type_infos.keys()) != 0 - def load_settings(self): - print("loading settings") - settings = load_settings(self.settings_save_path) - - if settings!= None: - print("settings", settings) - self.schemaPath = settings["schemaPath"] - self.load_schema() - generate_propertyGroups_for_components() - ensure_metadata_for_all_objects() - - - # we keep a list of component propertyGroup around - def register_component_propertyGroup(self, name, propertyGroup): - self.component_propertyGroups[name] = propertyGroup - - #for practicality, we add an entry for a reverse lookup (short => long name, since we already have long_name => short_name with the keys of the raw registry) - def add_shortName_to_longName(self, short_name, long_name): - self.short_names_to_long_names[short_name] = long_name - # to be able to give the user more feedback on any missin/unregistered types in their schema file - def add_missing_typeInfo(self, type_name): - if not type_name in self.type_infos_missing: - self.type_infos_missing.append(type_name) + def add_missing_typeInfo(self, long_name): + if not long_name in self.type_infos_missing: + self.type_infos_missing.append(long_name) setattr(self, "missing_type_infos", str(self.type_infos_missing)) item = self.missing_types_list.add() - item.type_name = type_name + item.long_name = long_name - def add_custom_type(self, type_name, type_definition): - self.custom_types_to_add[type_name] = type_definition + def add_custom_type(self, long_name, type_definition): + self.custom_types_to_add[long_name] = type_definition def process_custom_types(self): - for type_name in self.custom_types_to_add: - self.type_infos[type_name] = self.custom_types_to_add[type_name] + for long_name in self.custom_types_to_add: + self.type_infos[long_name] = self.custom_types_to_add[long_name] self.custom_types_to_add.clear() + # add an invalid component to the list (long name) def add_invalid_component(self, component_name): self.invalid_components.append(component_name) ########### - propGroupIdCounter: IntProperty( - name="propGroupIdCounter", - description="", - min=0, - max=1000000000, - default=0 - ) # type: ignore - - short_names_to_propgroup_names = {} + long_names_to_propgroup_names = {} - # generate propGroup name from nesting level & shortName: each shortName + nesting is unique - def generate_propGroup_name(self, nesting, shortName): - #print("gen propGroup name for", shortName, nesting) - #if shortName in self.short_names_to_propgroup_names and len(nesting) == 0: - # return self.get_propertyGroupName_from_shortName(shortName) - - self.propGroupIdCounter += 1 + # we keep a list of component propertyGroup around + def register_component_propertyGroup(self, nesting, property_group_params): + property_group_name = self.generate_propGroup_name(nesting) + (property_group_pointer, property_group_class) = property_group_from_infos(property_group_name, property_group_params) + self.component_propertyGroups[property_group_name] = property_group_pointer + self.component_property_group_classes.append(property_group_class) + + return (property_group_pointer, property_group_class) + + # generate propGroup name from nesting level: each longName + nesting is unique + def generate_propGroup_name(self, nesting): + key = str(nesting) + + propGroupHash = tiger_hash(key) + propGroupName = propGroupHash + "_ui" + + # check for collision + #padding = " " * (len(nesting) + 1) + #print(f"{padding}--computing hash for", nesting) + if propGroupName in self.long_names_to_propgroup_names.values(): + print(" WARNING !! you have a collision between the hash of multiple component names: collision for", nesting) + + self.long_names_to_propgroup_names[key] = propGroupName - propGroupIndex = str(self.propGroupIdCounter) - propGroupName = propGroupIndex + "_ui" - key = str(nesting) + shortName if len(nesting) > 0 else shortName - self.short_names_to_propgroup_names[key] = propGroupName return propGroupName - - def get_propertyGroupName_from_shortName(self, shortName): - return self.short_names_to_propgroup_names.get(shortName, None) + + def get_propertyGroupName_from_longName(self, longName): + return self.long_names_to_propgroup_names.get(str([longName]), None) ########### diff --git a/tools/blenvy/add_ons/bevy_components/registry/ui.py b/tools/blenvy/add_ons/bevy_components/registry/ui.py new file mode 100644 index 0000000..97e5e50 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/registry/ui.py @@ -0,0 +1,77 @@ +import bpy +from bpy_types import (UIList) + +class BLENVY_PT_components_missing_types_panel(bpy.types.Panel): + """panel listing all the missing bevy types in the schema""" + bl_idname = "BLENVY_PT_components_missing_types_panel" + bl_label = "Missing/Unregistered Types" + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_category = "Bevy Components" + bl_context = "objectmode" + bl_parent_id = "BLENVY_PT_SidePanel" + bl_options = {'DEFAULT_CLOSED'} + bl_description = "list of missing/unregistered type from the bevy side" + + @classmethod + def poll(cls, context): + return context.window_manager.blenvy.mode == 'TOOLS' + + def draw(self, context): + layout = self.layout + registry = bpy.context.window_manager.components_registry + + layout.label(text="Missing types ") + layout.template_list("BLENVY_UL_components_missing_types", "Missing types list", registry, "missing_types_list", registry, "missing_types_list_index") + + +class BLENVY_UL_components_missing_types(UIList): + """Missing components UIList.""" + + use_filter_name_reverse: bpy.props.BoolProperty( + name="Reverse Name", + default=False, + options=set(), + description="Reverse name filtering", + ) # type: ignore + + use_order_name = bpy.props.BoolProperty(name="Name", default=False, options=set(), + description="Sort groups by their name (case-insensitive)") + + def filter_items__(self, context, data, propname): + """Filter and order items in the list.""" + # We initialize filtered and ordered as empty lists. Notice that # if all sorting and filtering is disabled, we will return # these empty. + filtered = [] + ordered = [] + items = getattr(data, propname) + + helper_funcs = bpy.types.UI_UL_list + + + print("filter, order", items, self, dict(self)) + if self.filter_name: + print("ssdfs", self.filter_name) + filtered= helper_funcs.filter_items_by_name(self.filter_name, self.bitflag_filter_item, items, "long_name", reverse=self.use_filter_name_reverse) + + if not filtered: + filtered = [self.bitflag_filter_item] * len(items) + + if self.use_order_name: + ordered = helper_funcs.sort_items_by_name(items, "name") + + + return filtered, ordered + + + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + if self.layout_type in {'DEFAULT', 'COMPACT'}: + row = layout.row() + #row.enabled = False + #row.alert = True + row.prop(item, "long_name", text="") + + elif self.layout_type in {'GRID'}: + layout.alignment = 'CENTER' + row = layout.row() + row.prop(item, "long_name", text="") + diff --git a/tools/blenvy/add_ons/bevy_components/settings.py b/tools/blenvy/add_ons/bevy_components/settings.py new file mode 100644 index 0000000..739cf38 --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/settings.py @@ -0,0 +1,146 @@ +import os +import bpy +from bpy_types import (PropertyGroup) +from bpy.props import (EnumProperty, PointerProperty, StringProperty, BoolProperty, CollectionProperty, FloatProperty) +from blenvy.settings import load_settings, upsert_settings, generate_complete_settings_dict +from .propGroups.prop_groups import generate_propertyGroups_for_components +from .components.metadata import ensure_metadata_for_all_items +from .utils import add_component_to_ui_list + +# list of settings we do NOT want to save +settings_black_list = ['settings_save_enabled', 'watcher_active'] + +def save_settings(settings, context): + if settings.settings_save_enabled: + settings_dict = generate_complete_settings_dict(settings, ComponentsSettings, []) + print("save settings", settings, context,settings_dict) + upsert_settings(settings.settings_save_path, {key: settings_dict[key] for key in settings_dict.keys() if key not in settings_black_list}, overwrite=True) + +# helper function to deal with timer +def toggle_watcher(self, context): + if not self.watcher_enabled: + try: + bpy.app.timers.unregister(watch_schema) + except Exception as error: + pass + else: + self.watcher_active = True + bpy.app.timers.register(watch_schema) + save_settings(self, context) + +def watch_schema(): + blenvy = bpy.context.window_manager.blenvy + component_settings = blenvy.components + #print("watching schema file for changes") + try: + stamp = os.stat(component_settings.schema_path_full).st_mtime + stamp = str(stamp) + if stamp != component_settings.schemaTimeStamp and component_settings.schemaTimeStamp != "": + print("FILE CHANGED !!", stamp, component_settings.schemaTimeStamp) + # see here for better ways : https://stackoverflow.com/questions/11114492/check-if-a-file-is-not-open-nor-being-used-by-another-process + """try: + os.rename(path, path) + #return False + except OSError: # file is in use + print("in use") + #return True""" + # we need to add an additional delay as the file might not have loaded yet + bpy.app.timers.register(lambda: bpy.ops.blenvy.components_registry_reload(), first_interval=1) + component_settings.schemaTimeStamp = stamp + + if component_settings.schemaTimeStamp == "": + component_settings.schemaTimeStamp = stamp + except Exception as error: + pass + return component_settings.watcher_poll_frequency if component_settings.watcher_enabled else None + +class ComponentsSettings(PropertyGroup): + + settings_save_path = ".blenvy_components_settings" # where to store data in bpy.texts + settings_save_enabled: BoolProperty(name="settings save enabled", default=True)# type: ignore + + schema_path: StringProperty( + name="schema path", + description="path to the registry schema file (relative to the assets path)", + default="registry.json", + update=save_settings + )# type: ignore + + schema_path_full: StringProperty( + name="schema full path", + description="full path to the registry schema file", + get=lambda self: os.path.abspath(os.path.join(bpy.context.window_manager.blenvy.assets_path_full, self.schema_path)) + ) # type: ignore + + watcher_enabled: BoolProperty(name="Watcher_enabled", default=True, update=toggle_watcher)# type: ignore + watcher_active: BoolProperty(name = "Flag for watcher status", default = False)# type: ignore + + watcher_poll_frequency: FloatProperty( + name="watcher poll frequency", + description="frequency (s) at wich to poll for changes to the registry file", + min=1.0, + max=10.0, + default=1.0, + update=save_settings + )# type: ignore + + schemaTimeStamp: StringProperty( + name="last timestamp of schema file", + description="", + default="", + update=save_settings + )# type: ignore + + + component_selector: StringProperty( + search=add_component_to_ui_list, + description="component selector: only components present in the registry are accepted" + )# type: ignore + + + source_component_selector: StringProperty( + search=add_component_to_ui_list + )# type: ignore + + target_component_selector: StringProperty( + search=add_component_to_ui_list + )# type: ignore + + + @classmethod + def register(cls): + pass + #bpy.context.window_manager.blenvy.components.watcher_active = False + + @classmethod + def unregister(cls): + bpy.context.window_manager.blenvy.components.watcher_active = False + try: + bpy.app.timers.unregister(watch_schema) + except Exception as error: + pass + + def start_schema_watcher(self): + # start timer + if not self.watcher_active and self.watcher_enabled: + self.watcher_active = True + print("registering function", watch_schema) + bpy.app.timers.register(watch_schema) + + def load_settings(self): + settings = load_settings(self.settings_save_path) + print("component settings", settings) + if settings is not None: + self.settings_save_enabled = False # we disable auto_saving of our settings + try: + for setting in settings: + setattr(self, setting, settings[setting]) + except:pass + try: + registry = bpy.context.components_registry + registry.load_schema() + generate_propertyGroups_for_components() + ensure_metadata_for_all_items() + except:pass + + self.settings_save_enabled = True diff --git a/tools/blenvy/add_ons/bevy_components/ui.py b/tools/blenvy/add_ons/bevy_components/ui.py new file mode 100644 index 0000000..44afdcd --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/ui.py @@ -0,0 +1,20 @@ +def draw_settings_ui(layout, component_settings): + + row = layout.row() + col = row.column() + col.enabled = False + col.prop(component_settings, "schema_path", text="Registry Schema path") + col = row.column() + col.operator(operator="blenvy.components_registry_browse_schema", text="Browse for registry schema file (json)") + + layout.separator() + layout.operator(operator="blenvy.components_registry_reload", text="reload registry" , icon="FILE_REFRESH") + + layout.separator() + row = layout.row() + + row.prop(component_settings, "watcher_enabled", text="enable registry file polling") + row.prop(component_settings, "watcher_poll_frequency", text="registry file poll frequency (s)") + + layout.separator() + layout.separator() \ No newline at end of file diff --git a/tools/blenvy/add_ons/bevy_components/utils.py b/tools/blenvy/add_ons/bevy_components/utils.py new file mode 100644 index 0000000..411b5bc --- /dev/null +++ b/tools/blenvy/add_ons/bevy_components/utils.py @@ -0,0 +1,231 @@ +import bpy +from .constants import HIDDEN_COMPONENTS +from bpy.props import StringProperty, EnumProperty +from bpy_types import Operator +from blenvy.core.helpers_collections import (set_active_collection) + +import json + +def select_area(context, area_name): + for area in context.screen.areas: + #if area.type == 'PROPERTIES' and context.object is not None and context.object.type not in ('LIGHT_PROBE', 'CAMERA', 'LIGHT', 'SPEAKER'): + # Set it the active space + #print("SELECT AREA", area_name) + try: + area.spaces.active.context = area_name #'MATERIAL' # 'VIEW_LAYER', 'SCENE' etc. + except Exception as error: + print(f"failed to switch to area {area_name}: {error}") + break # OPTIONAL + +def get_collection_scene(collection): + for scene in bpy.data.scenes: + if scene.user_of_id(collection): + return scene + return None + +def get_object_by_name(name): + object = bpy.data.objects.get(name, None) + return object + +def get_object_scene(object): + object = bpy.data.objects.get(object.name, None) + if object is not None: + scenes_of_object = list(object.users_scene) + if len(scenes_of_object) > 0: + return scenes_of_object[0] + return None + + +def get_mesh_object(mesh): + for object in bpy.data.objects: + if isinstance(object.data, bpy.types.Mesh) and mesh.name == object.data.name: + return object + +def get_material_object(material): + for object in bpy.data.objects: + if isinstance(object.data, bpy.types.Mesh) and material.name in object.data.materials: + return object + + +class BLENVY_OT_item_select(Operator): + """Select object by name""" + bl_idname = "blenvy.select_item" + bl_label = "Select item (object or collection)" + bl_options = {"UNDO"} + + item_type : EnumProperty( + name="item type", + description="type of the item to select: object or collection", + items=( + ('OBJECT', "Object", ""), + ('COLLECTION', "Collection", ""), + ('MESH', "Mesh", ""), + ('MATERIAL', "Material", ""), + ), + default="OBJECT" + ) # type: ignore + + target_name: StringProperty( + name="target name", + description="target to select's name ", + ) # type: ignore + + + @classmethod + def register(cls): + bpy.types.WindowManager.blenvy_item_selected_ids = StringProperty(default="{}") + + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.blenvy_item_selected_ids + + + def execute(self, context): + + if self.target_name: + if self.item_type == 'OBJECT': + object = bpy.data.objects[self.target_name] + scenes_of_object = list(object.users_scene) + if len(scenes_of_object) > 0: + bpy.ops.object.select_all(action='DESELECT') + bpy.context.window.scene = scenes_of_object[0] + object.select_set(True) + context.window_manager.blenvy_item_selected_ids = json.dumps({"name": object.name, "type": self.item_type}) + + bpy.context.view_layer.objects.active = object + select_area(context=context, area_name="OBJECT") + + elif self.item_type == 'COLLECTION': + collection = bpy.data.collections[self.target_name] + scene_of_collection = get_collection_scene(collection) + if scene_of_collection is not None: + bpy.ops.object.select_all(action='DESELECT') + bpy.context.window.scene = scene_of_collection + #bpy.context.view_layer.objects.active = None + context.window_manager.blenvy_item_selected_ids = json.dumps({"name": collection.name, "type": self.item_type}) + set_active_collection(bpy.context.window.scene, collection.name) + + select_area(context=context, area_name="COLLECTION") + + elif self.item_type == 'MESH': + mesh = bpy.data.meshes[self.target_name] + mesh_object = get_mesh_object(mesh) + scene_of_item = get_object_scene(mesh_object) + if scene_of_item is not None: + bpy.ops.object.select_all(action='DESELECT') + bpy.context.window.scene = scene_of_item + bpy.context.view_layer.objects.active = mesh_object + + context.window_manager.blenvy_item_selected_ids = json.dumps({"name": mesh.name, "type": self.item_type}) + select_area(context=context, area_name="DATA") + + elif self.item_type == 'MATERIAL': + # find object that uses material + material = bpy.data.materials[self.target_name] + material_object = get_material_object(material) + scene_of_item = get_object_scene(material_object) + select_area(context=context, area_name="MATERIAL") + if scene_of_item is not None: + bpy.ops.object.select_all(action='DESELECT') + bpy.context.window.scene = scene_of_item + bpy.context.view_layer.objects.active = material_object + + context.window_manager.blenvy_item_selected_ids = json.dumps({"name": material.name, "type": self.item_type}) + + select_area(context=context, area_name="MATERIAL") + + return {'FINISHED'} + +def get_selected_item(context): + selection = None + + def get_outliner_area(): + if bpy.context.area.type!='OUTLINER': + for area in bpy.context.screen.areas: + if area.type == 'OUTLINER': + return area + return None + #print("original context", context) + + + + if selection is None: + area = get_outliner_area() + if area is not None: + region = next(region for region in area.regions if region.type == "WINDOW") + with bpy.context.temp_override(area=area, region=region): + #print("overriden context", bpy.context) + """for obj in bpy.context.selected_ids: + print(f"Selected: {obj.name} - {type(obj)}")""" + number_of_selections = len(bpy.context.selected_ids) + selection = bpy.context.selected_ids[number_of_selections - 1] if number_of_selections > 0 else None #next(iter(bpy.context.selected_ids), None) + + + + if selection is None: + number_of_selections = len(context.selected_objects) + selection = context.selected_objects[number_of_selections - 1] if number_of_selections > 0 else None + + if selection is None: + try: + selection_overrides = json.loads(context.window_manager.blenvy_item_selected_ids) + #print("selection_overrides", selection_overrides) + if selection_overrides["type"] == "OBJECT": + selection = bpy.data.objects[selection_overrides["name"]] + elif selection_overrides["type"] == "COLLECTION": + selection = bpy.data.collections[selection_overrides["name"]] + if selection_overrides["type"] == "MESH": + selection = bpy.data.meshes[selection_overrides["name"]] + elif selection_overrides["type"] == "MATERIAL": + selection = bpy.data.materials[selection_overrides["name"]] + #print("SELECTION", selection) + #context.window_manager.blenvy_item_selected_ids = "{}" + except: pass + return selection + + +def get_selection_type(selection): + #print("bla mesh", isinstance(selection, bpy.types.Mesh), "bli bli", selection.type) + if isinstance(selection, bpy.types.Material): + return 'MATERIAL' + if isinstance(selection, bpy.types.Mesh): + return 'MESH' + if isinstance(selection, bpy.types.Object): + return 'OBJECT' + if isinstance(selection, bpy.types.Collection): + return 'COLLECTION' + +def get_item_by_type(item_type, item_name): + item = None + if item_type == 'OBJECT': + item = bpy.data.objects[item_name] + elif item_type == 'COLLECTION': + item = bpy.data.collections[item_name] + elif item_type == "MESH": + item = bpy.data.meshes[item_name] + elif item_type == 'MATERIAL': + item = bpy.data.materials[item_name] + return item + +def add_component_to_ui_list(self, context, _): + items = [] + type_infos = context.window_manager.components_registry.type_infos + for long_name in type_infos.keys(): + definition = type_infos[long_name] + short_name = definition["short_name"] + is_component = definition['isComponent'] if "isComponent" in definition else False + """if self.filter.lower() in short_name.lower() and is_component:""" + if is_component and not 'Handle' in short_name and not "Cow" in short_name and not "AssetId" in short_name and short_name not in HIDDEN_COMPONENTS: # FIXME: hard coded, seems wrong + items.append((long_name, short_name)) + items.sort(key=lambda a: a[1]) + return items + + +def is_component_valid_and_enabled(object, component_name): + if "components_meta" in object or hasattr(object, "components_meta"): + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == component_name, target_components_metadata), None) + if component_meta is not None: + return component_meta.enabled and not component_meta.invalid + return True \ No newline at end of file diff --git a/tools/blenvy/assets/__init__.py b/tools/blenvy/assets/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/assets/asset_helpers.py b/tools/blenvy/assets/asset_helpers.py new file mode 100644 index 0000000..4484eca --- /dev/null +++ b/tools/blenvy/assets/asset_helpers.py @@ -0,0 +1,42 @@ +import json + +def get_user_assets(scene_or_collection): + user_assets = getattr(scene_or_collection, 'user_assets', []) + return user_assets + +def get_generated_assets(scene_or_collection): + generated_assets = getattr(scene_or_collection, 'generated_assets', []) + return generated_assets + +def get_user_assets_as_list(scene_or_collection): + raw = get_user_assets(scene_or_collection) + result = [] + for asset in raw: + result.append({"name": asset.name, "path": asset.path, "type": "MODEL", "internal": False, "parent": None}) + return result + +def upsert_asset(scene_or_collection, asset): + new_asset = scene_or_collection.user_assets.add() + new_asset.name = asset["name"] + new_asset.path = asset["path"] + +def remove_asset(scene_or_collection, ref_asset): + print("to remove", ref_asset["path"], scene_or_collection.user_assets.find(ref_asset["path"]), scene_or_collection.user_assets) + removal_index = -1 + for index, asset in enumerate(scene_or_collection.user_assets): + print("asset in list", asset.name, asset.path) + if asset.path == ref_asset["path"]: + print("FOUND", index) + removal_index = index + break + #scene_or_collection.user_assets.find(lambda x,y : print(x)) + if removal_index != -1 : + print("REMOVE") + scene_or_collection.user_assets.remove(removal_index) + #scene_or_collection.user_assets.remove(scene_or_collection.user_assets.find(ref_asset["path"])) + +def does_asset_exist(scene_or_collection, ref_asset): + user_assets = getattr(scene_or_collection, 'user_assets', []) + in_list = [asset for asset in user_assets if (asset.path == ref_asset["path"])] + in_list = len(in_list) > 0 + return in_list \ No newline at end of file diff --git a/tools/blenvy/assets/assets_folder_browser.py b/tools/blenvy/assets/assets_folder_browser.py new file mode 100644 index 0000000..290bce0 --- /dev/null +++ b/tools/blenvy/assets/assets_folder_browser.py @@ -0,0 +1,101 @@ + +import bpy +import os +from bpy_extras.io_utils import ImportHelper +from bpy.types import Operator + +from ..core.path_helpers import absolute_path_from_blend_file + +class BLENVY_OT_assets_paths_browse(Operator, ImportHelper): + """Assets folder's browser""" + bl_idname = "blenvy.assets_paths_browse" + bl_label = "Select folder" + + # Define this to tell 'fileselect_add' that we want a directoy + directory: bpy.props.StringProperty( + name="Outdir Path", + description="selected folder" + # subtype='DIR_PATH' is not needed to specify the selection mode. + # But this will be anyway a directory path. + ) # type: ignore + + # Filters folders + filter_folder: bpy.props.BoolProperty( + default=True, + options={"HIDDEN"} + ) # type: ignore + + target_property: bpy.props.StringProperty( + name="target_property", + options={'HIDDEN'} + ) # type: ignore + + def execute(self, context): + """Do something with the selected file(s).""" + operator = context.window_manager.blenvy + new_path = self.directory + target_path_name = self.target_property + + # path to the current blend file + blend_file_path = bpy.data.filepath + # Get the folder + blend_file_folder_path = os.path.dirname(blend_file_path) + #print("blend_file_folder_path", blend_file_folder_path) + #print("new_path", self.directory, self.target_property, operator) + + asset_path_names = ['blueprints_path', 'levels_path', 'materials_path'] + project_root_path = absolute_path_from_blend_file(operator.project_root_path) + assets_path = operator.assets_path + assets_path_full = absolute_path_from_blend_file(os.path.join(project_root_path, assets_path)) #os.path.join(blend_file_folder_path, project_root_path, assets_path) + #print("assets_path_full", assets_path_full) + + #new_root_path = os.path.join(blend_file_folder_path, new_path) + if target_path_name == 'project_root_path': + new_root_path_relative = os.path.relpath(new_path, blend_file_folder_path) + new_root_path_absolute = new_path + + #print("new_root_path_relative", new_root_path_relative, new_root_path_absolute) + # first change the asset's path + old_assets_paths_relative = getattr(operator, "assets_path", None) + if old_assets_paths_relative is not None: + old_assets_paths_absolute = os.path.abspath(os.path.join(project_root_path, old_assets_paths_relative)) + new_assets_path_relative = os.path.relpath(old_assets_paths_absolute, new_root_path_absolute) + new_assets_path_absolute = os.path.abspath(os.path.join(new_root_path_absolute, new_assets_path_relative)) + + """print("old_assets_paths_absolute", old_assets_paths_absolute) + print("new_assets_path_relative", new_assets_path_relative) + print("new_assets_path_absolute", new_assets_path_absolute)""" + setattr(operator, "assets_path", new_assets_path_relative) + + # we need to change all other relative paths (root => assets => blueprints/levels/materials etc) + for path_name in asset_path_names: + # get current relative path + relative_path = getattr(operator, path_name, None) + if relative_path is not None: + # and now get absolute path of asset_path + # compute 'old' absolute path + old_absolute_path = os.path.abspath(os.path.join(assets_path_full, relative_path)) + relative_path = os.path.relpath(old_absolute_path, new_assets_path_absolute) + setattr(operator, path_name, relative_path) + + # store the root path as relative to the current blend file + setattr(operator, target_path_name, new_root_path_relative) + elif target_path_name == 'assets_path': + new_assets_path_relative = os.path.relpath(new_path, project_root_path) + new_assets_path_absolute = new_path + # we need to change all other relative paths (root => assets => blueprints/levels/materials etc) + for path_name in asset_path_names: + # get 'old' relative path + relative_path = getattr(operator, path_name, None) + if relative_path is not None: + # compute 'old' absolute path + old_absolute_path = os.path.abspath(os.path.join(assets_path_full, relative_path)) + relative_path = os.path.relpath(old_absolute_path, new_assets_path_absolute) + setattr(operator, path_name, relative_path) + + setattr(operator, target_path_name, new_assets_path_relative) + else: + relative_path = os.path.relpath(new_path, assets_path_full) + setattr(operator, target_path_name, relative_path) + + return {'FINISHED'} \ No newline at end of file diff --git a/tools/blenvy/assets/assets_registry.py b/tools/blenvy/assets/assets_registry.py new file mode 100644 index 0000000..5a32300 --- /dev/null +++ b/tools/blenvy/assets/assets_registry.py @@ -0,0 +1,67 @@ +import bpy +from pathlib import Path +from bpy_types import (PropertyGroup) +from bpy.props import (StringProperty, BoolProperty, FloatProperty, FloatVectorProperty, IntProperty, IntVectorProperty, EnumProperty, PointerProperty, CollectionProperty) + +# Asset property group +class Asset(PropertyGroup): + name: StringProperty(name="asset name") # type: ignore + path: StringProperty(name="asset path") # type: ignore + +# this is where we store the information for all available assets +# +class AssetsRegistry(PropertyGroup): + assets_list = [] + + asset_name_selector: StringProperty( + name="asset name", + description="name of asset to add", + ) # type: ignore + + asset_type_selector: EnumProperty( + name="asset type", + description="type of asset to add", + items=( + ('MODEL', "Model", ""), + ('AUDIO', "Audio", ""), + ('IMAGE', "Image", ""), + ('TEXT', "Text", ""), + ) + ) # type: ignore + + asset_path_selector: StringProperty( + name="asset path", + description="path of asset to add", + #subtype='FILE_PATH' + ) # type: ignore + + + @classmethod + def register(cls): + bpy.types.Scene.user_assets = CollectionProperty(name="user assets", type=Asset) + bpy.types.Collection.user_assets = CollectionProperty(name="user assets", type=Asset) + + bpy.types.Scene.generated_assets = CollectionProperty(name="generated assets", type=Asset) + bpy.types.Collection.generated_assets = CollectionProperty(name="generated assets", type=Asset) + + bpy.types.WindowManager.assets_registry = PointerProperty(type=AssetsRegistry) + + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.assets_registry + del bpy.types.Scene.user_assets + del bpy.types.Collection.user_assets + + del bpy.types.Scene.generated_assets + del bpy.types.Collection.generated_assets + + def add_asset(self, name, type, path, internal): # internal means it cannot be edited by the user, aka auto generated + in_list = [asset for asset in self.assets_list if (asset["path"] == path)] + in_list = len(in_list) > 0 + if not in_list: + self.assets_list.append({"name": name, "type": type, "path": path, "internal": internal}) + + def remove_asset(self, path): + self.assets_list[:] = [asset for asset in self.assets_list if (asset["path"] != path)] + diff --git a/tools/blenvy/assets/assets_scan.py b/tools/blenvy/assets/assets_scan.py new file mode 100644 index 0000000..16b6191 --- /dev/null +++ b/tools/blenvy/assets/assets_scan.py @@ -0,0 +1,169 @@ +import os +import json +import bpy + +from .asset_helpers import does_asset_exist, get_user_assets, get_user_assets_as_list + +def scan_assets(scene, blueprints_data, settings): + project_root_path = getattr(settings, "project_root_path") + export_output_folder = getattr(settings,"export_output_folder") + levels_path = getattr(settings,"levels_path") + blueprints_path = getattr(settings, "blueprints_path") + export_gltf_extension = getattr(settings, "export_gltf_extension") + + relative_blueprints_path = os.path.relpath(blueprints_path, project_root_path) + blueprint_instance_names_for_scene = blueprints_data.blueprint_instances_per_level_scene.get(scene.name, None) + + blueprint_assets_list = [] + if blueprint_instance_names_for_scene: + for blueprint_name in blueprint_instance_names_for_scene: + blueprint = blueprints_data.blueprints_per_name.get(blueprint_name, None) + if blueprint is not None: + #print("BLUEPRINT", blueprint) + blueprint_exported_path = None + if blueprint.local: + blueprint_exported_path = os.path.join(relative_blueprints_path, f"{blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + blueprint_exported_path = blueprint.collection['Export_path'] if 'Export_path' in blueprint.collection else None + if blueprint_exported_path is not None: + blueprint_assets_list.append({"name": blueprint.name, "path": blueprint_exported_path}) + + + # fetch images/textures + # see https://blender.stackexchange.com/questions/139859/how-to-get-absolute-file-path-for-linked-texture-image + textures = [] + for ob in bpy.data.objects: + if ob.type == "MESH": + for mat_slot in ob.material_slots: + if mat_slot.material: + if mat_slot.material.node_tree: + textures.extend([x.image.filepath for x in mat_slot.material.node_tree.nodes if x.type=='TEX_IMAGE']) + print("textures", textures) + + assets_list_name = f"assets_{scene.name}" + assets_list_data = {"blueprints": json.dumps(blueprint_assets_list), "sounds":[], "images":[]} + + #print("blueprint assets", blueprint_assets_list) + + +def get_userTextures(): + # TODO: limit this to the ones actually in use + # fetch images/textures + # see https://blender.stackexchange.com/questions/139859/how-to-get-absolute-file-path-for-linked-texture-image + textures = [] + for ob in bpy.data.objects: + if ob.type == "MESH": + for mat_slot in ob.material_slots: + if mat_slot.material: + if mat_slot.material.node_tree: + textures.extend([x.image.filepath for x in mat_slot.material.node_tree.nodes if x.type=='TEX_IMAGE']) + print("textures", textures) + +def get_blueprint_assets_tree(blueprint, blueprints_data, parent, settings): + blueprints_path = getattr(settings, "blueprints_path") + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + assets_list = [] + + + for blueprint_name in blueprint.nested_blueprints: + child_blueprint = blueprints_data.blueprints_per_name.get(blueprint_name, None) + if child_blueprint: + blueprint_exported_path = None + if blueprint.local: + blueprint_exported_path = os.path.join(blueprints_path, f"{child_blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + blueprint_exported_path = child_blueprint.collection['export_path'] if 'export_path' in child_blueprint.collection else None + if blueprint_exported_path is not None: + assets_list.append({"name": child_blueprint.name, "path": blueprint_exported_path, "type": "MODEL", "generated": True,"internal":blueprint.local, "parent": blueprint.name}) + + # and add sub stuff + sub_assets_lists = get_blueprint_assets_tree(child_blueprint, blueprints_data, parent=child_blueprint.name, settings=settings) + assets_list += sub_assets_lists + + direct_assets = get_user_assets_as_list(blueprint.collection) + for asset in direct_assets: + asset["parent"] = parent + asset["internal"] = blueprint.local + assets_list += direct_assets + return assets_list + +def get_level_scene_assets_tree(level_scene, blueprints_data, settings): + blueprints_path = getattr(settings, "blueprints_path") + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + blueprint_instance_names_for_scene = blueprints_data.blueprint_instances_per_level_scene.get(level_scene.name, None) + + assets_list = get_user_assets_as_list(level_scene) + if blueprint_instance_names_for_scene: + for blueprint_name in blueprint_instance_names_for_scene: + blueprint = blueprints_data.blueprints_per_name.get(blueprint_name, None) + if blueprint is not None: + blueprint_exported_path = None + if blueprint.local: + blueprint_exported_path = os.path.join(blueprints_path, f"{blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + blueprint_exported_path = blueprint.collection['export_path'] if 'export_path' in blueprint.collection else None + if blueprint_exported_path is not None and not does_asset_exist(assets_list, blueprint_exported_path): + assets_list.append({"name": blueprint.name, "path": blueprint_exported_path, "type": "MODEL", "generated": True, "internal":blueprint.local, "parent": None}) + + assets_list += get_blueprint_assets_tree(blueprint, blueprints_data, parent=blueprint.name, settings=settings) + + print("TOTAL ASSETS", assets_list) + # FIXME: do not do it here !! + scene = bpy.data.scenes[level_scene.name] + scene.generated_assets.clear() + for asset in assets_list: + if asset.get("generated", False): + added_asset = scene.generated_assets.add() + added_asset.name = asset["name"] + added_asset.path = asset["path"] + return assets_list + +# same as the above, withouth the clutter below : TODO: unify +def get_level_scene_assets_tree2(level_scene, blueprints_data, settings): + blueprints_path = getattr(settings, "blueprints_path") + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + blueprint_instance_names_for_scene = blueprints_data.blueprint_instances_per_level_scene.get(level_scene.name, None) + + assets_list = get_user_assets_as_list(level_scene) + if blueprint_instance_names_for_scene: + for blueprint_name in blueprint_instance_names_for_scene: + blueprint = blueprints_data.blueprints_per_name.get(blueprint_name, None) + if blueprint is not None: + blueprint_exported_path = None + if blueprint.local: + blueprint_exported_path = os.path.join(blueprints_path, f"{blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + blueprint_exported_path = blueprint.collection['export_path'] if 'export_path' in blueprint.collection else None + if blueprint_exported_path is not None and not does_asset_exist(assets_list, blueprint_exported_path): + assets_list.append({"name": blueprint.name, "path": blueprint_exported_path, "type": "MODEL", "generated": True, "internal":blueprint.local, "parent": None}) + + assets_list += get_blueprint_assets_tree(blueprint, blueprints_data, parent=blueprint.name, settings=settings) + + return assets_list + +def get_blueprint_asset_tree(blueprint, blueprints_data, settings): + blueprints_path = getattr(settings, "blueprints_path") + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + + assets_list = get_user_assets_as_list(blueprint.collection) + + for blueprint_name in blueprint.nested_blueprints: + sub_blueprint = blueprints_data.blueprints_per_name.get(blueprint_name, None) + if sub_blueprint is not None: + sub_blueprint_exported_path = None + if sub_blueprint.local: + sub_blueprint_exported_path = os.path.join(blueprints_path, f"{sub_blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + sub_blueprint_exported_path = sub_blueprint.collection['export_path'] if 'export_path' in sub_blueprint.collection else None + + if sub_blueprint_exported_path is not None and not does_asset_exist(assets_list, sub_blueprint_exported_path): + assets_list.append({"name": sub_blueprint.name, "path": sub_blueprint_exported_path, "type": "MODEL", "generated": True, "internal": sub_blueprint.local, "parent": None}) + + assets_list += get_blueprint_assets_tree(sub_blueprint, blueprints_data, parent=sub_blueprint.name, settings=settings) + + return assets_list diff --git a/tools/blenvy/assets/generate_asset_file.py b/tools/blenvy/assets/generate_asset_file.py new file mode 100644 index 0000000..26e95b6 --- /dev/null +++ b/tools/blenvy/assets/generate_asset_file.py @@ -0,0 +1,28 @@ + + +def write_ron_assets_file(name, assets_hierarchy, internal_only=False, output_path_full="."): + # just for testing, this uses the format of bevy_asset_loader's asset files + ''' + ({ + "world":File (path: "models/StartLevel.glb"), + "level1":File (path: "models/Level1.glb"), + "level2":File (path: "models/Level2.glb"), + + "models": Folder ( + path: "models/library", + ), + "materials": Folder ( + path: "materials", + ), + }) + ''' + formated_assets = [] + for asset in assets_hierarchy: + if asset["internal"] or not internal_only: + formated_asset = f'\n "{asset["name"]}": File ( path: "{asset["path"]}" ),' + formated_assets.append(formated_asset) + + with open(f"{output_path_full}/{name}.assets.ron", "w") as assets_file: + assets_file.write("({") + assets_file.writelines(formated_assets) + assets_file.write("\n})") \ No newline at end of file diff --git a/tools/blenvy/assets/operators.py b/tools/blenvy/assets/operators.py new file mode 100644 index 0000000..35ed9b9 --- /dev/null +++ b/tools/blenvy/assets/operators.py @@ -0,0 +1,194 @@ +import os +import json +import bpy +from bpy_types import (Operator) +from bpy.props import (BoolProperty, StringProperty, EnumProperty) + +from .asset_helpers import does_asset_exist, get_user_assets, remove_asset, upsert_asset +from .assets_scan import get_level_scene_assets_tree +from ..core.path_helpers import absolute_path_from_blend_file +from .generate_asset_file import write_ron_assets_file + +class BLENVY_OT_assets_add(Operator): + """Add asset""" + bl_idname = "blenvy.assets_add" + bl_label = "Add bevy asset" + bl_options = {"UNDO"} + + asset_name: StringProperty( + name="asset name", + description="name of asset to add", + ) # type: ignore + + asset_type: EnumProperty( + items=( + ('MODEL', "Model", ""), + ('AUDIO', "Audio", ""), + ('IMAGE', "Image", ""), + ('TEXT', "Text", ""), + ) + ) # type: ignore + + asset_path: StringProperty( + name="asset path", + description="path of asset to add", + subtype='FILE_PATH' + ) # type: ignore + + # what are we targetting + target_type: EnumProperty( + name="target type", + description="type of the target: scene or blueprint to add an asset to", + items=( + ('SCENE', "Scene", ""), + ('BLUEPRINT', "Blueprint", ""), + ), + ) # type: ignore + + target_name: StringProperty( + name="target name", + description="name of the target blueprint or scene to add asset to" + ) # type: ignore + + def execute(self, context): + blueprint_assets = self.target_type == 'BLUEPRINT' + target = None + if blueprint_assets: + target = bpy.data.collections[self.target_name] + else: + target = bpy.data.scenes[self.target_name] + assets = get_user_assets(target) + asset = {"name": self.asset_name, "type": self.asset_type, "path": self.asset_path} + print('assets', assets, target) + if not does_asset_exist(target, asset): + print("add asset", target, asset) + upsert_asset(target, asset) + + #assets.append({"name": self.asset_name, "type": self.asset_type, "path": self.asset_path, "internal": False}) + # reset controls + context.window_manager.assets_registry.asset_name_selector = "" + context.window_manager.assets_registry.asset_type_selector = "MODEL" + context.window_manager.assets_registry.asset_path_selector = "" + + """if blueprint_assets: + bpy.data.collections[self.target_name]["assets"] = json.dumps(assets) + else: + bpy.data.scenes[self.target_name]["assets"] = json.dumps(assets)""" + + return {'FINISHED'} + + +class BLENVY_OT_assets_remove(Operator): + """Remove asset""" + bl_idname = "blenvy.assets_remove" + bl_label = "remove bevy asset" + bl_options = {"UNDO"} + + asset_path: StringProperty( + name="asset path", + description="path of asset to add", + subtype='FILE_PATH' + ) # type: ignore + + + clear_all: BoolProperty ( + name="clear all assets", + description="clear all assets", + default=False + ) # type: ignore + + # what are we targetting + target_type: EnumProperty( + name="target type", + description="type of the target: scene or blueprint to add an asset to", + items=( + ('SCENE', "Scene", ""), + ('BLUEPRINT', "Blueprint", ""), + ), + ) # type: ignore + + target_name: StringProperty( + name="target name", + description="name of the target blueprint or scene to add asset to" + ) # type: ignore + + + def execute(self, context): + print("REMOVE ASSET", self.target_name, self.target_type, self.asset_path) + assets = [] + blueprint_assets = self.target_type == 'BLUEPRINT' + if blueprint_assets: + target = bpy.data.collections[self.target_name] + else: + target = bpy.data.scenes[self.target_name] + print("removing this", target) + remove_asset(target, {"path": self.asset_path}) + + return {'FINISHED'} + + +import os +from bpy_extras.io_utils import ImportHelper +from pathlib import Path + +class BLENVY_OT_assets_browse(Operator, ImportHelper): + """Browse for asset files""" + bl_idname = "blenvy.assets_open_filebrowser" + bl_label = "Select asset file" + + # Define this to tell 'fileselect_add' that we want a directoy + filepath: bpy.props.StringProperty( + name="asset Path", + description="selected file", + subtype='FILE_PATH', + ) # type: ignore + + # Filters files + filter_glob: StringProperty(options={'HIDDEN'}, default='*.*') # type: ignore + + def execute(self, context): + blenvy = context.window_manager.blenvy + project_root_path = blenvy.project_root_path + assets_path = blenvy.assets_path + # FIXME: not sure + print("project_root_path", project_root_path, "assets_path", assets_path) + export_assets_path_absolute = absolute_path_from_blend_file(os.path.join(project_root_path, assets_path)) + + asset_path = os.path.relpath(self.filepath, export_assets_path_absolute) + print("asset path", asset_path) + + assets_registry = context.window_manager.assets_registry + assets_registry.asset_path_selector = asset_path + if assets_registry.asset_name_selector == "": + assets_registry.asset_name_selector = Path(os.path.basename(asset_path)).stem + + print("SELECTED ASSET PATH", asset_path) + + + + return {'FINISHED'} + + + +from types import SimpleNamespace + + +class BLENVY_OT_assets_generate_files(Operator): + """Test assets""" + bl_idname = "blenvy.assets_generate_files" + bl_label = "test bevy assets" + bl_options = {"UNDO"} + + def execute(self, context): + blenvy = context.window_manager.blenvy + settings = blenvy + blueprints_registry = context.window_manager.blueprints_registry + blueprints_registry.refresh_blueprints() + blueprints_data = blueprints_registry.blueprints_data + + for scene in blenvy.level_scenes: + assets_hierarchy = get_level_scene_assets_tree(scene, blueprints_data, settings) + # scene["assets"] = json.dumps(assets_hierarchy) + write_ron_assets_file(scene.name, assets_hierarchy, internal_only = False, output_path_full = blenvy.levels_path_full) + + return {'FINISHED'} diff --git a/tools/blenvy/assets/ui.py b/tools/blenvy/assets/ui.py new file mode 100644 index 0000000..2b39e1e --- /dev/null +++ b/tools/blenvy/assets/ui.py @@ -0,0 +1,109 @@ +from types import SimpleNamespace +import bpy +from .assets_scan import get_level_scene_assets_tree +from .asset_helpers import get_user_assets, does_asset_exist + +def draw_assets(layout, name, title, asset_registry, target_type, target_name, editable=True, user_assets= [], generated_assets = []): + nesting_indent = 0.05 + number_of_user_assets = len(user_assets) + number_of_generated_assets = len(generated_assets) + + header, panel = layout.panel(f"assets{name}", default_closed=True) + header.label(text=title + f"({number_of_user_assets})", icon="ASSET_MANAGER") + + + blueprint_assets = target_type == 'BLUEPRINT' + if blueprint_assets: + target = bpy.data.collections[target_name] + else: + target = bpy.data.scenes[target_name] + + add_possible = does_asset_exist(target, {"path": asset_registry.asset_path_selector}) #"name": asset_registry.asset_name_selector, + + if header and editable: + row = header.row() + row.alert = add_possible + + row.prop(asset_registry, "asset_name_selector", text="") + row.label(text=asset_registry.asset_path_selector) + row.operator(operator="blenvy.assets_open_filebrowser", text="", icon="FILE_FOLDER") + + add_asset_layout = row.column() + add_asset_layout.enabled = not add_possible + + add_asset = add_asset_layout.operator(operator="blenvy.assets_add", text="", icon="ADD") + add_asset.target_type = target_type + add_asset.target_name = target_name + add_asset.asset_name = asset_registry.asset_name_selector + add_asset.asset_type = asset_registry.asset_type_selector + add_asset.asset_path = asset_registry.asset_path_selector + + if panel: + if editable: + row = panel.row() + #panel.separator() + for asset in user_assets: + row = panel.row() + split = row.split(factor=nesting_indent) + col = split.column() + col.label(text=" ") + col = split.column() + + row = col.row() + row.label(icon="ASSET_MANAGER") + row.prop(asset, "name", text="") + row.label(text=asset.path) + asset_selector = row.operator(operator="blenvy.assets_open_filebrowser", text="", icon="FILE_FOLDER") + + remove_asset = row.operator(operator="blenvy.assets_remove", text="", icon="TRASH") + remove_asset.target_type = target_type + remove_asset.target_name = target_name + remove_asset.asset_path = asset.path + return panel + +class BLENVY_PT_assets_panel(bpy.types.Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_label = "" + bl_parent_id = "BLENVY_PT_SidePanel" + bl_options = {'DEFAULT_CLOSED','HIDE_HEADER'} + @classmethod + def poll(cls, context): + return context.window_manager.blenvy.mode == 'ASSETS' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + blenvy = context.window_manager.blenvy + + layout.operator(operator="blenvy.assets_generate_files") + + asset_registry = context.window_manager.assets_registry + blueprints_registry = context.window_manager.blueprints_registry + #blueprints_registry.refresh_blueprints() + blueprints_data = blueprints_registry.blueprints_data + + name = "world" + header, panel = layout.box().panel(f"assets{name}", default_closed=False) + header.label(text="World/Level Assets") + + settings = {"blueprints_path": "blueprints", "export_gltf_extension": ".glb"} + settings = SimpleNamespace(**settings) + + if panel: + for scene in blenvy.level_scenes: + user_assets = get_user_assets(scene) + + row = panel.row() + row.prop(scene, "always_export") + + scene_assets_panel = draw_assets(layout=row, name=scene.name, title=f"{scene.name} Assets", asset_registry=asset_registry, user_assets=user_assets, target_type="SCENE", target_name=scene.name) + """if scene.name in blueprints_data.blueprint_instances_per_level_scene: + for blueprint_name in blueprints_data.blueprint_instances_per_level_scene[scene.name].keys(): + blueprint = blueprints_data.blueprints_per_name[blueprint_name] + blueprint_assets = get_user_assets(blueprint.collection) + if scene_assets_panel: + row = scene_assets_panel.row() + draw_assets(layout=row, name=blueprint.name, title=f"{blueprint.name} Assets", asset_registry=asset_registry, assets=blueprint_assets, target_type="BLUEPRINT", target_name=blueprint.name) +""" \ No newline at end of file diff --git a/tools/blenvy/blender_manifest.toml b/tools/blenvy/blender_manifest.toml new file mode 100644 index 0000000..1ff7dff --- /dev/null +++ b/tools/blenvy/blender_manifest.toml @@ -0,0 +1,69 @@ +schema_version = "1.0.0" + +id = "Blenvy" +version = "0.1.0" +name = "Blenvy" +tagline = "Tools to add/edit components of objects, collections etc & create blueprints & levels for the Bevy Engine in Blender" +maintainer = "kaosat-dev " +type = "add-on" + +# Optional link to documentation, support, source files, etc +# website = "https://extensions.blender.org/add-ons/my-example-package/" +website = "https://github.com/kaosat-dev/Blenvy" + +# Optional list defined by Blender and server, see: +# https://docs.blender.org/manual/en/dev/advanced/extensions/tags.html +tags = ["Game Engine", "User Interface", "Import-Export"] + +blender_version_min = "4.2.0" +# # Optional: Blender version that the extension does not support, earlier versions are supported. +# # This can be omitted and defined later on the extensions platform if an issue is found. +# blender_version_max = "5.1.0" + +# License conforming to https://spdx.org/licenses/ (use "SPDX: prefix) +# https://docs.blender.org/manual/en/dev/advanced/extensions/licenses.html +license = [ + "SPDX:MIT" +] +copyright = [ + "2023-2024 kaosat-dev", +] + +# Optional list of supported platforms. If omitted, the extension will be available in all operating systems. +# platforms = ["windows-x64", "macos-arm64", "linux-x64"] +# Other supported platforms: "windows-arm64", "macos-x64" + +# Optional: bundle 3rd party Python modules. +# https://docs.blender.org/manual/en/dev/advanced/extensions/python_wheels.html +# wheels = [ +# "./wheels/hexdump-3.3-py3-none-any.whl", +# "./wheels/jsmin-3.0.1-py3-none-any.whl", +# ] + +# # Optional: add-ons can list which resources they will require: +# # * files (for access of any filesystem operations) +# # * network (for internet access) +# # * clipboard (to read and/or write the system clipboard) +# # * camera (to capture photos and videos) +# # * microphone (to capture audio) +# # +# # If using network, remember to also check `bpy.app.online_access` +# # https://docs.blender.org/manual/en/dev/advanced/extensions/addons.html#internet-access +# # +# # For each permission it is important to also specify the reason why it is required. +# # Keep this a single short sentence without a period (.) at the end. +# # For longer explanations use the documentation or detail page. +# +[permissions] +# network = "Need to sync motion-capture data to server" +files = "Export Gltf files to disk, read registry files, etc" +# clipboard = "Copy and paste bone transforms" + +# Optional: build settings. +# https://docs.blender.org/manual/en/dev/advanced/extensions/command_line_arguments.html#command-line-args-extension-build +# [build] +# paths_exclude_pattern = [ +# "__pycache__/", +# "/.git/", +# "/*.zip", +# ] \ No newline at end of file diff --git a/tools/blenvy/blueprints/__init__.py b/tools/blenvy/blueprints/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/blueprints/blueprint.py b/tools/blenvy/blueprints/blueprint.py new file mode 100644 index 0000000..98462c6 --- /dev/null +++ b/tools/blenvy/blueprints/blueprint.py @@ -0,0 +1,18 @@ +class Blueprint: + def __init__(self, name): + self.name = name + self.local = True + self.marked = False # If marked as asset or with auto_export flag, always export if changed + self.scene = None # Not sure, could be usefull for tracking + + self.instances = [] + self.objects = [] + self.nested_blueprints = [] + + self.collection = None # should we just sublclass ? + + def __repr__(self): + return f'Name: {self.name} Local: {self.local}, Scene: {self.scene}, Instances: {self.instances}, Objects: {self.objects}, nested_blueprints: {self.nested_blueprints}' + + def __str__(self): + return f'Name: "{self.name}", Local: {self.local}, Scene: {self.scene}, Instances: {self.instances}, Objects: {self.objects}, nested_blueprints: {self.nested_blueprints}' diff --git a/tools/blenvy/blueprints/blueprint_helpers.py b/tools/blenvy/blueprints/blueprint_helpers.py new file mode 100644 index 0000000..9ac08df --- /dev/null +++ b/tools/blenvy/blueprints/blueprint_helpers.py @@ -0,0 +1,85 @@ + +import os +import json +import bpy +from pathlib import Path + +from ..core.scene_helpers import add_scene_property + +def find_blueprints_not_on_disk(blueprints, folder_path, extension): + not_found_blueprints = [] + for blueprint in blueprints: + gltf_output_path = os.path.join(folder_path, blueprint.name + extension) + # print("gltf_output_path", gltf_output_path) + found = os.path.exists(gltf_output_path) and os.path.isfile(gltf_output_path) + if not found: + not_found_blueprints.append(blueprint) + return not_found_blueprints + +def check_if_blueprint_on_disk(scene_name, folder_path, extension): + gltf_output_path = os.path.join(folder_path, scene_name + extension) + found = os.path.exists(gltf_output_path) and os.path.isfile(gltf_output_path) + return found + +def inject_export_path_into_internal_blueprints(internal_blueprints, blueprints_path, gltf_extension, settings): + export_materials_library = getattr(settings.auto_export, "export_materials_library") + # FIXME: duplicate of materials stuff + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + materials_path = getattr(settings, "materials_path") + current_project_name = Path(bpy.context.blend_data.filepath).stem + materials_library_name = f"{current_project_name}_materials" + materials_exported_path = os.path.join(materials_path, f"{materials_library_name}{export_gltf_extension}") + + for blueprint in internal_blueprints: + blueprint_exported_path = os.path.join(blueprints_path, f"{blueprint.name}{gltf_extension}") + # print("injecting blueprint path", blueprint_exported_path, "for", blueprint.name) + blueprint.collection["export_path"] = blueprint_exported_path + if export_materials_library: + blueprint.collection["materials_path"] = materials_exported_path + + +def inject_blueprints_list_into_level_scene(scene, blueprints_data, settings): + project_root_path = getattr(settings, "project_root_path") + assets_path = getattr(settings,"assets_path") + levels_path = getattr(settings,"levels_path") + blueprints_path = getattr(settings, "blueprints_path") + export_gltf_extension = getattr(settings, "export_gltf_extension") + + # print("injecting assets/blueprints data into scene") + assets_list_name = f"assets_list_{scene.name}_components" + assets_list_data = {} + + blueprint_instance_names_for_scene = blueprints_data.blueprint_instances_per_level_scene.get(scene.name, None) + blueprint_assets_list = [] + if blueprint_instance_names_for_scene: + for blueprint_name in blueprint_instance_names_for_scene: + blueprint = blueprints_data.blueprints_per_name.get(blueprint_name, None) + if blueprint is not None: + #print("BLUEPRINT", blueprint) + blueprint_exported_path = None + if blueprint.local: + blueprint_exported_path = os.path.join(blueprints_path, f"{blueprint.name}{export_gltf_extension}") + else: + # get the injected path of the external blueprints + blueprint_exported_path = blueprint.collection['Export_path'] if 'Export_path' in blueprint.collection else None + #print("foo", dict(blueprint.collection)) + if blueprint_exported_path is not None: + blueprint_assets_list.append({"name": blueprint.name, "path": blueprint_exported_path, "type": "MODEL", "internal": True}) + + + + + assets_list_name = f"assets_{scene.name}" + scene["assets"] = json.dumps(blueprint_assets_list) + + #print("blueprint assets", blueprint_assets_list) + +def remove_blueprints_list_from_level_scene(scene): + assets_list = None + assets_list_name = f"assets_list_{scene.name}_components" + + for object in scene.objects: + if object.name == assets_list_name: + assets_list = object + if assets_list is not None: + bpy.data.objects.remove(assets_list, do_unlink=True) diff --git a/tools/blenvy/blueprints/blueprints_registry.py b/tools/blenvy/blueprints/blueprints_registry.py new file mode 100644 index 0000000..4f8fd03 --- /dev/null +++ b/tools/blenvy/blueprints/blueprints_registry.py @@ -0,0 +1,72 @@ +from types import SimpleNamespace +import bpy +import json +import os +import uuid +from pathlib import Path +from bpy_types import (PropertyGroup) +from bpy.props import (StringProperty, BoolProperty, FloatProperty, FloatVectorProperty, IntProperty, IntVectorProperty, EnumProperty, PointerProperty, CollectionProperty) + +from ..settings import load_settings +from .blueprints_scan import blueprints_scan + + + +def refresh_blueprints(): + try: + blueprints_registry = bpy.context.window_manager.blueprints_registry + blueprints_registry.refresh_blueprints() + except:pass + + return 3 + +# this is where we store the information for all available Blueprints +class BlueprintsRegistry(PropertyGroup): + blueprints_data = None + blueprints_list = [] + + asset_name_selector: StringProperty( + name="asset name", + description="name of asset to add", + ) # type: ignore + + asset_type_selector: EnumProperty( + name="asset type", + description="type of asset to add", + items=( + ('MODEL', "Model", ""), + ('AUDIO', "Audio", ""), + ('IMAGE', "Image", ""), + ) + ) # type: ignore + + asset_path_selector: StringProperty( + name="asset path", + description="path of asset to add", + subtype='FILE_PATH' + ) # type: ignore + + @classmethod + def register(cls): + bpy.types.WindowManager.blueprints_registry = PointerProperty(type=BlueprintsRegistry) + bpy.app.timers.register(refresh_blueprints) + + @classmethod + def unregister(cls): + try: + bpy.app.timers.unregister(refresh_blueprints) + except: pass + + del bpy.types.WindowManager.blueprints_registry + + + def add_blueprint(self, blueprint): + self.blueprints_list.append(blueprint) + + def refresh_blueprints(self): + #print("titi", self) + blenvy = bpy.context.window_manager.blenvy + settings = blenvy + blueprints_data = blueprints_scan(settings.level_scenes, settings.library_scenes, settings) + self.blueprints_data = blueprints_data + return blueprints_data diff --git a/tools/blenvy/blueprints/blueprints_scan.py b/tools/blenvy/blueprints/blueprints_scan.py new file mode 100644 index 0000000..ffa0e5b --- /dev/null +++ b/tools/blenvy/blueprints/blueprints_scan.py @@ -0,0 +1,239 @@ +from types import SimpleNamespace +import bpy +from .blueprint import Blueprint + +# blueprints: any collection with either +# - an instance +# - marked as asset +# - with the "auto_export" flag +# https://blender.stackexchange.com/questions/167878/how-to-get-all-collections-of-the-current-scene +def blueprints_scan(level_scenes, library_scenes, settings): + blueprints = {} + blueprints_from_objects = {} + blueprint_name_from_instances = {} + collections = [] + + # level scenes + blueprint_instances_per_level_scene = {} + internal_collection_instances = {} + external_collection_instances = {} + + # meh + def add_object_to_collection_instances(collection_name, object, internal=True): + collection_category = internal_collection_instances if internal else external_collection_instances + if not collection_name in collection_category.keys(): + #print("ADDING INSTANCE OF", collection_name, "object", object.name, "categ", collection_category) + collection_category[collection_name] = [] #.append(collection_name) + collection_category[collection_name].append(object) + + for scene in level_scenes:# should it only be level scenes ? what about collection instances inside other scenes ? + for object in scene.objects: + #print("object", object.name) + if object.instance_type == 'COLLECTION': + collection = object.instance_collection + collection_name = object.instance_collection.name + #print(" from collection:", collection_name) + + collection_from_library = False + for library_scene in library_scenes: # should be only in library scenes + collection_from_library = library_scene.user_of_id(collection) > 0 # TODO: also check if it is an imported asset + if collection_from_library: + break + + add_object_to_collection_instances(collection_name=collection_name, object=object, internal = collection_from_library) + + # experiment with custom properties from assets stored in other blend files + """if not collection_from_library: + for property_name in object.keys(): + print("stuff", property_name) + for property_name in collection.keys(): + print("OTHER", property_name)""" + + # blueprints[collection_name].instances.append(object) + + # FIXME: this only account for direct instances of blueprints, not for any nested blueprint inside a blueprint + if scene.name not in blueprint_instances_per_level_scene.keys(): + blueprint_instances_per_level_scene[scene.name] = {} + if collection_name not in blueprint_instances_per_level_scene[scene.name].keys(): + blueprint_instances_per_level_scene[scene.name][collection_name] = [] + blueprint_instances_per_level_scene[scene.name][collection_name].append(object) + + blueprint_name_from_instances[object] = collection_name + + """# add any indirect ones + # FIXME: needs to be recursive, either here or above + for nested_blueprint in blueprints[collection_name].nested_blueprints: + if not nested_blueprint in blueprint_instances_per_level_scene[scene.name]: + blueprint_instances_per_level_scene[scene.name].append(nested_blueprint)""" + + for collection in bpy.data.collections: + #print("collection", collection, collection.name_full, "users", collection.users) + + collection_from_library = False + defined_in_scene = None + for scene in library_scenes: # should be only in library scenes + collection_from_library = scene.user_of_id(collection) > 0 + if collection_from_library: + defined_in_scene = scene + break + if not collection_from_library: + continue + + + if ( + 'AutoExport' in collection and collection['AutoExport'] == True # get marked collections + or collection.asset_data is not None # or if you have marked collections as assets you can auto export them too + or collection.name in list(internal_collection_instances.keys()) # or if the collection has an instance in one of the level scenes + ): + blueprint = Blueprint(collection.name) + blueprint.local = True + blueprint.marked = 'AutoExport' in collection and collection['AutoExport'] == True or collection.asset_data is not None + blueprint.objects = [object.name for object in collection.all_objects if not object.instance_type == 'COLLECTION'] # inneficient, double loop + blueprint.nested_blueprints = [object.instance_collection.name for object in collection.all_objects if object.instance_type == 'COLLECTION'] # FIXME: not precise enough, aka "what is a blueprint" + blueprint.collection = collection + blueprint.instances = internal_collection_instances[collection.name] if collection.name in internal_collection_instances else [] + blueprint.scene = defined_in_scene + blueprints[collection.name] = blueprint + + # add nested collections to internal/external_collection instances + # FIXME: inneficient, third loop over all_objects + for object in collection.all_objects: + if object.instance_type == 'COLLECTION': + add_object_to_collection_instances(collection_name=object.instance_collection.name, object=object, internal = blueprint.local) + + # now create reverse lookup , so you can find the collection from any of its contained objects + for object in collection.all_objects: + blueprints_from_objects[object.name] = blueprint#collection.name + + # + collections.append(collection) + + # EXTERNAL COLLECTIONS: add any collection that has an instance in the level scenes, but is not present in any of the scenes (IE NON LOCAL/ EXTERNAL) + for collection_name in external_collection_instances: + collection = bpy.data.collections[collection_name] + blueprint = Blueprint(collection.name) + blueprint.local = False + blueprint.marked = True #external ones are always marked, as they have to have been marked in their original file #'AutoExport' in collection and collection['AutoExport'] == True + blueprint.objects = [object.name for object in collection.all_objects if not object.instance_type == 'COLLECTION'] # inneficient, double loop + blueprint.nested_blueprints = [object.instance_collection.name for object in collection.all_objects if object.instance_type == 'COLLECTION'] # FIXME: not precise enough, aka "what is a blueprint" + blueprint.collection = collection + blueprint.instances = external_collection_instances[collection.name] if collection.name in external_collection_instances else [] + blueprints[collection.name] = blueprint + #print("EXTERNAL COLLECTION", collection, dict(collection)) + + # add nested collections to internal/external_collection instances + # FIXME: inneficient, third loop over all_objects + """for object in collection.all_objects: + if object.instance_type == 'COLLECTION': + add_object_to_collection_instances(collection_name=object.instance_collection.name, object=object, internal = blueprint.local)""" + + # now create reverse lookup , so you can find the collection from any of its contained objects + for object in collection.all_objects: + blueprints_from_objects[object.name] = blueprint#collection.name + + + # then add any nested collections at root level (so we can have a flat list, regardless of nesting) + # TODO: do this recursively + for blueprint_name in list(blueprints.keys()): + parent_blueprint = blueprints[blueprint_name] + + for nested_blueprint_name in parent_blueprint.nested_blueprints: + if not nested_blueprint_name in blueprints.keys(): + collection = bpy.data.collections[nested_blueprint_name] + blueprint = Blueprint(collection.name) + blueprint.local = parent_blueprint.local + blueprint.objects = [object.name for object in collection.all_objects if not object.instance_type == 'COLLECTION'] # inneficient, double loop + blueprint.nested_blueprints = [object.instance_collection.name for object in collection.all_objects if object.instance_type == 'COLLECTION'] # FIXME: not precise enough, aka "what is a blueprint" + blueprint.collection = collection + blueprint.instances = external_collection_instances[collection.name] if collection.name in external_collection_instances else [] + blueprint.scene = parent_blueprint.scene if parent_blueprint.local else None + blueprints[collection.name] = blueprint + + + # now create reverse lookup , so you can find the collection from any of its contained objects + for object in collection.all_objects: + blueprints_from_objects[object.name] = blueprint#collection.name + + + blueprints = dict(sorted(blueprints.items())) + + '''print("BLUEPRINTS") + for blueprint_name in blueprints: + print(" ", blueprints[blueprint_name]) + + """print("BLUEPRINTS LOOKUP") + print(blueprints_from_objects)""" + + print("BLUEPRINT INSTANCES PER MAIN SCENE") + print(blueprint_instances_per_level_scene)''' + + + """changes_test = {'Library': { + 'Blueprint1_mesh': bpy.data.objects['Blueprint1_mesh'], + 'Fox_mesh': bpy.data.objects['Fox_mesh'], + 'External_blueprint2_Cylinder': bpy.data.objects['External_blueprint2_Cylinder']} + } + # which level scene has been impacted by this + # does one of the level scenes contain an INSTANCE of an impacted blueprint + for scene in level_scenes: + changed_objects = list(changes_test["Library"].keys()) # just a hack for testing + #bluprint_instances_in_scene = blueprint_instances_per_level_scene[scene.name] + #print("instances per scene", bluprint_instances_in_scene, "changed_objects", changed_objects) + + changed_blueprints_with_instances_in_scene = [blueprints_from_objects[changed] for changed in changed_objects if changed in blueprints_from_objects] + print("changed_blueprints_with_instances_in_scene", changed_blueprints_with_instances_in_scene) + level_needs_export = len(changed_blueprints_with_instances_in_scene) > 0 + if level_needs_export: + print("level needs export", scene.name) + + for scene in library_scenes: + changed_objects = list(changes_test[scene.name].keys()) + changed_blueprints = [blueprints_from_objects[changed] for changed in changed_objects if changed in blueprints_from_objects] + # we only care about local blueprints/collections + changed_local_blueprints = [blueprint_name for blueprint_name in changed_blueprints if blueprint_name in blueprints.keys() and blueprints[blueprint_name].local] + print("changed blueprints", changed_local_blueprints)""" + + # additional helper data structures for lookups etc + blueprints_per_name = blueprints + blueprints = [] # flat list + internal_blueprints = [] + external_blueprints = [] + blueprints_per_scenes = {} + + blueprint_instances_per_library_scene = {} + + for blueprint in blueprints_per_name.values(): + blueprints.append(blueprint) + if blueprint.local: + internal_blueprints.append(blueprint) + if blueprint.scene: + if not blueprint.scene.name in blueprints_per_scenes: + blueprints_per_scenes[blueprint.scene.name] = [] + blueprints_per_scenes[blueprint.scene.name].append(blueprint.name) # meh + + else: + external_blueprints.append(blueprint) + + # we also need to have blueprint instances for + + data = { + "blueprints": blueprints, + "blueprints_per_name": blueprints_per_name, + "blueprint_names": list(blueprints_per_name.keys()), + "blueprints_from_objects": blueprints_from_objects, + + "internal_blueprints": internal_blueprints, + "external_blueprints": external_blueprints, + "blueprints_per_scenes": blueprints_per_scenes, + + "blueprint_instances_per_level_scene": blueprint_instances_per_level_scene, + "blueprint_instances_per_library_scene": blueprint_instances_per_library_scene, + + # not sure about these two + "internal_collection_instances": internal_collection_instances, + "external_collection_instances": external_collection_instances, + + "blueprint_name_from_instances": blueprint_name_from_instances + } + + return SimpleNamespace(**data) diff --git a/tools/blenvy/blueprints/operators.py b/tools/blenvy/blueprints/operators.py new file mode 100644 index 0000000..92ec234 --- /dev/null +++ b/tools/blenvy/blueprints/operators.py @@ -0,0 +1,33 @@ +import os +import bpy +from bpy_types import (Operator) +from bpy.props import (StringProperty) +from blenvy.core.helpers_collections import set_active_collection + +class BLENVY_OT_blueprint_select(Operator): + """Select blueprint """ + bl_idname = "blenvy.blueprint_select" + bl_label = "Select blueprint" + bl_options = {"UNDO"} + + blueprint_collection_name: StringProperty( + name="blueprint collection name", + description="blueprints to select's collection name ", + ) # type: ignore + + blueprint_scene_name: StringProperty( + name="blueprint scene name", + description="blueprints to select's collection name ", + ) # type: ignore + + def execute(self, context): + if self.blueprint_collection_name: + scene = bpy.data.scenes[self.blueprint_scene_name] + if scene: + bpy.ops.object.select_all(action='DESELECT') + bpy.context.window.scene = scene + bpy.context.view_layer.objects.active = None + set_active_collection(scene, self.blueprint_collection_name) + + return {'FINISHED'} + \ No newline at end of file diff --git a/tools/blenvy/blueprints/ui.py b/tools/blenvy/blueprints/ui.py new file mode 100644 index 0000000..4157031 --- /dev/null +++ b/tools/blenvy/blueprints/ui.py @@ -0,0 +1,80 @@ +import bpy +import json + +from ..assets.asset_helpers import get_user_assets, get_generated_assets + +from ..assets.ui import draw_assets + + +def draw_blueprints(layout, name, title, generated_assets): + nesting_indent = 0.05 + number_of_generated_assets = len(generated_assets) + + header, panel = layout.panel(f"assets{name}", default_closed=True) + header.label(text=title + f"({number_of_generated_assets})", icon="XRAY") + + if panel: + for asset in generated_assets: + row = panel.row() + split = row.split(factor=nesting_indent) + col = split.column() + col.label(text=" ") + col = split.column() + + sub_header, sub_panel = col.panel(f"assets_sub{asset.name}", default_closed=False) + sub_header.label(text=f"{asset.name} ({asset.path})", icon="XRAY") + if sub_panel: + sub_panel.label(text=" some stuff") + +class BLENVY_PT_blueprints_panel(bpy.types.Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_label = "Blueprints" + bl_parent_id = "BLENVY_PT_SidePanel" + bl_options = {'DEFAULT_CLOSED','HIDE_HEADER'} + + @classmethod + def poll(cls, context): + return context.window_manager.blenvy.mode == 'BLUEPRINTS' if 'blenvy' in context.window_manager else False + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + asset_registry = context.window_manager.assets_registry + blueprint_registry = context.window_manager.blueprints_registry + + blueprint_registry.refresh_blueprints() + + for blueprint in blueprint_registry.blueprints_data.blueprints: + + header, panel = layout.box().panel(f"blueprint_assets{blueprint.name}", default_closed=True) + if header: + header.label(text=blueprint.name, icon="XRAY") + header.prop(blueprint.collection, "always_export") + + if blueprint.local: + select_blueprint = header.operator(operator="blenvy.blueprint_select", text="", icon="RESTRICT_SELECT_OFF") + if blueprint.collection and blueprint.collection.name: + select_blueprint.blueprint_collection_name = blueprint.collection.name + select_blueprint.blueprint_scene_name = blueprint.scene.name + + if panel: + split = panel.split(factor=0.005) + col = split.column() + col.label(text=" ") + + col = split.column() + + if blueprint.local: + user_assets = get_user_assets(blueprint.collection) + generated_assets = get_generated_assets(blueprint.collection) + + draw_assets(layout=col, name=blueprint.name, title="Assets", asset_registry=asset_registry, user_assets=user_assets, generated_assets=generated_assets, target_type="BLUEPRINT", target_name=blueprint.name) + + else: + user_assets = get_user_assets(blueprint.collection) + generated_assets = get_generated_assets(blueprint.collection) + + draw_assets(layout=col, name=blueprint.name, title="Assets", asset_registry=asset_registry, user_assets=user_assets, generated_assets=generated_assets, target_type="BLUEPRINT", target_name=blueprint.name, editable=False) + panel.label(text="External blueprint, assets are not editable") diff --git a/tools/blenvy/core/__init__.py b/tools/blenvy/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/core/blenvy_manager.py b/tools/blenvy/core/blenvy_manager.py new file mode 100644 index 0000000..bf14d24 --- /dev/null +++ b/tools/blenvy/core/blenvy_manager.py @@ -0,0 +1,204 @@ +import os +import bpy +from bpy_types import (PropertyGroup) +from bpy.props import (BoolProperty, EnumProperty, PointerProperty, StringProperty, CollectionProperty, IntProperty) +from ..settings import upsert_settings, load_settings, generate_complete_settings_dict +import blenvy.add_ons.auto_export.settings as auto_export_settings +import blenvy.add_ons.bevy_components.settings as component_settings + + +# list of settings we do NOT want to save +settings_black_list = ['settings_save_enabled', 'level_scene_selector', 'library_scene_selector'] + +def save_settings(settings, context): + if settings.settings_save_enabled: + settings_dict = generate_complete_settings_dict(settings, BlenvyManager, []) + raw_settings = {key: settings_dict[key] for key in settings_dict.keys() if key not in settings_black_list} + # we need to inject the main & library scene names as they are computed properties, not blender ones + raw_settings['level_scenes_names'] = settings.level_scenes_names + raw_settings['library_scenes_names'] = settings.library_scenes_names + upsert_settings(settings.settings_save_path, raw_settings, overwrite=True) + +def update_asset_folders(settings, context): + asset_path_names = ['project_root_path', 'assets_path', 'blueprints_path', 'levels_path', 'materials_path'] + for asset_path_name in asset_path_names: + upsert_settings(settings.settings_save_path, {asset_path_name: getattr(settings, asset_path_name)}) + settings_dict = generate_complete_settings_dict(settings, BlenvyManager, []) + upsert_settings(settings.settings_save_path, {key: settings_dict[key] for key in settings_dict.keys() if key not in settings_black_list}, overwrite=True) + + +def is_scene_already_in_use(self, scene): + try: + current_level_scene_names = list(map(lambda x: x.name, self.level_scenes)) + current_library_scene_names = list(map(lambda x: x.name, self.library_scenes)) + #print("scene ", scene.name, current_level_scene_names, current_library_scene_names) + return scene.name not in current_level_scene_names and scene.name not in current_library_scene_names + except: + return True + +class BlenvyManager(PropertyGroup): + settings_save_path = ".blenvy_common_settings" # where to store data in bpy.texts + settings_save_enabled: BoolProperty(name="settings save enabled", default=True) # type: ignore + scenes_to_scene_names = {} # used to map scenes to scene names to detect scene renames for diffing + + mode: EnumProperty( + items=( + ('COMPONENTS', "Components", ""), + ('BLUEPRINTS', "Blueprints", ""), + ('LEVELS', "Levels", ""), + ('ASSETS', "Assets", ""), + ('SETTINGS', "Settings", ""), + ('TOOLS', "Tools", ""), + ), + default="SETTINGS", + update=save_settings + ) # type: ignore + + config_mode: EnumProperty( + items=( + ('COMMON', "Common", "Switch to common configuration"), + ('COMPONENTS', "Components", "Switch to components configuration"), + ('EXPORT', "Export", "Switch to export configuration"), + ), + default="COMMON", + update=save_settings + ) # type: ignore + + + project_root_path: StringProperty( + name = "Project Root Path", + description="The root folder of your (Bevy) project (not assets!)", + default='../', + update= save_settings + ) # type: ignore + + # computed property for the absolute path of assets + project_root_path_full: StringProperty( + get=lambda self: os.path.abspath(os.path.join(os.path.dirname(bpy.data.filepath), self.project_root_path)) + ) # type: ignore + + assets_path: StringProperty( + name='Export folder', + description='The root folder for all exports(relative to the root folder/path) Defaults to "assets" ', + default='./assets', + options={'HIDDEN'}, + update= save_settings + ) # type: ignore + + # computed property for the absolute path of assets + assets_path_full: StringProperty( + get=lambda self: os.path.abspath(os.path.join(os.path.dirname(bpy.data.filepath), self.project_root_path, self.assets_path)) + ) # type: ignore + + blueprints_path: StringProperty( + name='Blueprints path', + description='path to export the blueprints to (relative to the assets folder)', + default='blueprints', + update= save_settings + ) # type: ignore + + # computed property for the absolute path of blueprints + blueprints_path_full: StringProperty( + get=lambda self: os.path.abspath(os.path.join(os.path.dirname(bpy.data.filepath), self.project_root_path, self.assets_path, self.blueprints_path)) + ) # type: ignore + + levels_path: StringProperty( + name='Levels path', + description='path to export the levels (level scenes) to (relative to the assets folder)', + default='levels', + update= save_settings + ) # type: ignore + + # computed property for the absolute path of blueprints + levels_path_full: StringProperty( + get=lambda self: os.path.abspath(os.path.join(os.path.dirname(bpy.data.filepath), self.project_root_path, self.assets_path, self.levels_path)) + ) # type: ignore + + materials_path: StringProperty( + name='Materials path', + description='path to export the materials libraries to (relative to the assets folder)', + default='materials', + update= save_settings + ) # type: ignore + + # computed property for the absolute path of blueprints + materials_path_full: StringProperty( + get=lambda self: os.path.abspath(os.path.join(os.path.dirname(bpy.data.filepath), self.project_root_path, self.assets_path, self.materials_path)) + ) # type: ignore + + # sub ones + auto_export: PointerProperty(type=auto_export_settings.AutoExportSettings) # type: ignore + components: PointerProperty(type=component_settings.ComponentsSettings) # type: ignore + + level_scene_selector: PointerProperty(type=bpy.types.Scene, name="level scene", description="level scene picker", poll=is_scene_already_in_use, update=save_settings)# type: ignore + library_scene_selector: PointerProperty(type=bpy.types.Scene, name="library scene", description="library scene picker", poll=is_scene_already_in_use, update=save_settings)# type: ignore + + @property + def level_scenes(self): + return [scene for scene in bpy.data.scenes if scene.blenvy_scene_type == 'Level'] + + @property + def level_scenes_names(self): + return [scene.name for scene in self.level_scenes] + + @property + def library_scenes(self): + return [scene for scene in bpy.data.scenes if scene.blenvy_scene_type == 'Library'] + + @property + def library_scenes_names(self): + return [scene.name for scene in self.library_scenes] + + @classmethod + def register(cls): + bpy.types.WindowManager.blenvy = PointerProperty(type=BlenvyManager) + + # unsure + bpy.types.Collection.always_export = BoolProperty(default=False, description="always export this blueprint, regardless of changed status") # FIXME: not sure about this one + bpy.types.Scene.always_export = BoolProperty(default=False, description="always export this blueprint, regardless of changed status") # FIXME: not sure about this one + bpy.types.Scene.blenvy_scene_type = EnumProperty( + items= ( + ('None', 'None', 'No blenvy type specified'), + ('Level', 'Level','Level scene'), + ('Library', 'Library', 'Library scene'), + ), + default='None' + ) + + @classmethod + def unregister(cls): + del bpy.types.WindowManager.blenvy + + del bpy.types.Collection.always_export + del bpy.types.Scene.always_export + del bpy.types.Scene.blenvy_scene_type + + def load_settings(self): + print("LOAD SETTINGS") + settings = load_settings(self.settings_save_path) + if settings is not None: + self.settings_save_enabled = False # we disable auto_saving of our settings + try: + for setting in settings: + print("setting", setting, settings[setting]) + setattr(self, setting, settings[setting]) + except:pass + """if "mode" in settings: + self.mode = settings["mode"] + + asset_path_names = ['project_root_path', 'assets_path', 'blueprints_path', 'levels_path', 'materials_path'] + for asset_path_name in asset_path_names: + if asset_path_name in settings: + setattr(self, asset_path_name, settings[asset_path_name])""" + + self.settings_save_enabled = True + + # now load auto_export settings + self.auto_export.load_settings() + + # now load component settings + self.components.load_settings() + + + for scene in bpy.data.scenes: + self.scenes_to_scene_names[scene] = scene.name diff --git a/tools/blenvy/core/helpers_collections.py b/tools/blenvy/core/helpers_collections.py new file mode 100644 index 0000000..ad5c3d6 --- /dev/null +++ b/tools/blenvy/core/helpers_collections.py @@ -0,0 +1,23 @@ +import bpy + +# traverse all collections +def traverse_tree(t): + yield t + for child in t.children: + yield from traverse_tree(child) + +#Recursivly transverse layer_collection for a particular name +def recurLayerCollection(layerColl, collName): + found = None + if (layerColl.name == collName): + return layerColl + for layer in layerColl.children: + found = recurLayerCollection(layer, collName) + if found: + return found + +def set_active_collection(scene, collection_name): + layer_collection = bpy.data.scenes[scene.name].view_layers['ViewLayer'].layer_collection + layerColl = recurLayerCollection(layer_collection, collection_name) + # set active collection to the collection + bpy.context.view_layer.active_layer_collection = layerColl diff --git a/tools/gltf_auto_export/helpers/object_makers.py b/tools/blenvy/core/object_makers.py similarity index 67% rename from tools/gltf_auto_export/helpers/object_makers.py rename to tools/blenvy/core/object_makers.py index 50827b5..3d27c51 100644 --- a/tools/gltf_auto_export/helpers/object_makers.py +++ b/tools/blenvy/core/object_makers.py @@ -42,6 +42,29 @@ def make_cube(name, location=[0,0,0], rotation=[0,0,0], scale=[1,1,1], collectio new_object.scale = scale new_object.rotation_euler = rotation - if collection != None: + if collection is not None: collection.objects.link( new_object ) - return new_object \ No newline at end of file + return new_object + + + +"""import bpy +import json + +# Makes an empty, at the specified location, rotation, scale stores it in existing collection, from https://blender.stackexchange.com/questions/51290/how-to-add-empty-object-not-using-bpy-ops +def make_empty(name, location, rotation, scale, collection): + object_data = None + empty_obj = bpy.data.objects.new( name, object_data ) + + empty_obj.empty_display_size = 2 + empty_obj.empty_display_type = 'PLAIN_AXES' + + empty_obj.name = name + empty_obj.location = location + empty_obj.scale = scale + empty_obj.rotation_euler = rotation + + collection.objects.link( empty_obj ) + #bpy.context.view_layer.update() + return empty_obj +""" \ No newline at end of file diff --git a/tools/blenvy/core/operators.py b/tools/blenvy/core/operators.py new file mode 100644 index 0000000..ad545b8 --- /dev/null +++ b/tools/blenvy/core/operators.py @@ -0,0 +1,52 @@ +from bpy_types import (Operator) +from bpy.props import (EnumProperty) + +class BLENVY_OT_tooling_switch(Operator): + """Switch blenvy tooling""" + bl_idname = "bevy.tooling_switch" + bl_label = "Switch bevy tooling" + #bl_options = {} + + tool: EnumProperty( + items=( + ('COMPONENTS', "Components", "Switch to components"), + ('BLUEPRINTS', "Blueprints", ""), + ('LEVELS', "Levels", ""), + ('ASSETS', "Assets", ""), + ('SETTINGS', "Settings", ""), + ('TOOLS', "Tools", ""), + ) + ) # type: ignore + + @classmethod + def description(cls, context, properties): + return properties.tool + + def execute(self, context): + context.window_manager.blenvy.mode = self.tool + return {'FINISHED'} + + + +class BLENVY_OT_configuration_switch(Operator): + """Switch tooling configuration""" + bl_idname = "bevy.config_switch" + bl_label = "Switch blenvy configuration" + #bl_options = {} + + tool: EnumProperty( + items=( + ('COMMON', "Common", "Switch to common configuration"), + ('COMPONENTS', "Components", "Switch to components configuration"), + ('EXPORT', "Export", "Switch to export configuration"), + ) + ) # type: ignore + + @classmethod + def description(cls, context, properties): + return properties.tool + + def execute(self, context): + context.window_manager.blenvy.config_mode = self.tool + return {'FINISHED'} + \ No newline at end of file diff --git a/tools/blenvy/core/path_helpers.py b/tools/blenvy/core/path_helpers.py new file mode 100644 index 0000000..8bdd38f --- /dev/null +++ b/tools/blenvy/core/path_helpers.py @@ -0,0 +1,11 @@ +import bpy +import os + +def absolute_path_from_blend_file(path): + # path to the current blend file + blend_file_path = bpy.data.filepath + # Get the folder + blend_file_folder_path = os.path.dirname(blend_file_path) + + # absolute path + return os.path.abspath(os.path.join(blend_file_folder_path, path)) diff --git a/tools/blenvy/core/scene_helpers.py b/tools/blenvy/core/scene_helpers.py new file mode 100644 index 0000000..417ff44 --- /dev/null +++ b/tools/blenvy/core/scene_helpers.py @@ -0,0 +1,31 @@ +import bpy +from bpy.props import (PointerProperty) +from .object_makers import make_empty + +def add_scene_property(scene, scene_component_name, property_data, limit_to=None): + root_collection = scene.collection + scene_property = None + for object in scene.objects: + if object.name == scene_component_name: + scene_property = object + break + + if scene_property is None: + scene_property = make_empty(scene_component_name, [0,0,0], [0,0,0], [0,0,0], root_collection) + + for key in property_data.keys(): + if limit_to is not None: + if key in limit_to: + scene_property[key] = property_data[key] + else: + scene_property[key] = property_data[key] + + +# compatibility helper until we land gltf_extras at the scene level for Bevy +# it copies a custom property into an __components object's properties +def copy_scene_or_collection_property_to_object_component(scene, property_name, target_object_name): + property_value = scene.get(property_name, None) + if property_value is not None: + property_data = {} + property_data[property_name] = property_value + add_scene_property(scene=scene, scene_component_name=target_object_name, property_data=property_data) \ No newline at end of file diff --git a/tools/blenvy/core/ui/__init__.py b/tools/blenvy/core/ui/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/core/ui/scenes_list.py b/tools/blenvy/core/ui/scenes_list.py new file mode 100644 index 0000000..3940025 --- /dev/null +++ b/tools/blenvy/core/ui/scenes_list.py @@ -0,0 +1,64 @@ +import bpy +from bpy.types import Operator + +class BLENVY_OT_scenes_list_actions(Operator): + """Move items up and down, add and remove""" + bl_idname = "blenvy.scenes_list_actions" + bl_label = "List Actions" + bl_description = "Move items up and down, add and remove" + bl_options = {'REGISTER'} + + action: bpy.props.EnumProperty( + items=( + ('UP', "Up", ""), + ('DOWN', "Down", ""), + ('REMOVE', "Remove", ""), + ('ADD', "Add", "")) + ) # type: ignore + + scene_type: bpy.props.EnumProperty( + items=( + ('LEVEL', "Level", ""), + ('LIBRARY', "Library", ""), + ) + ) # type: ignore + + scene_name : bpy.props.StringProperty(name="scene_name")# type: ignore + + def invoke(self, context, event): + if self.action == 'REMOVE': + bpy.data.scenes[self.scene_name].blenvy_scene_type = 'None' + context.window_manager.blenvy.level_scene_selector = None # we use these to force update/save the list of level/library scenes + context.window_manager.blenvy.library_scene_selector = None # we use these to force update/save the list of level/library scenes + """info = 'Item "%s" removed from list' % (target[idx].name) + target.remove(idx) + + setattr(source, target_index, current_index -1 ) + self.report({'INFO'}, info)""" + + if self.action == 'ADD': + scene_to_add = None + if self.scene_type == "LEVEL": + if context.window_manager.blenvy.level_scene_selector: + scene_to_add = context.window_manager.blenvy.level_scene_selector + scene_to_add.blenvy_scene_type = "Level" + else: + if context.window_manager.blenvy.library_scene_selector: + scene_to_add = context.window_manager.blenvy.library_scene_selector + scene_to_add.blenvy_scene_type = "Library" + + if scene_to_add is not None: + print("adding scene", scene_to_add) + + if self.scene_type == "LEVEL": + context.window_manager.blenvy.level_scene_selector = None # we use these to force update/save the list of level/library scenes + else: + context.window_manager.blenvy.library_scene_selector = None # we use these to force update/save the list of level/library scenes + + #setattr(source, target_index, len(target) - 1) + + #info = '"%s" added to list' % (item.name) + #self.report({'INFO'}, info) + + return {"FINISHED"} + diff --git a/tools/blenvy/core/ui/ui.py b/tools/blenvy/core/ui/ui.py new file mode 100644 index 0000000..8212463 --- /dev/null +++ b/tools/blenvy/core/ui/ui.py @@ -0,0 +1,182 @@ +import bpy +import blenvy.add_ons.bevy_components.ui as components_ui +import blenvy.add_ons.auto_export.ui as auto_export_ui +# from ...bevy_components.components import ui# as components_ui +###################################################### + +## ui logic & co +def draw_folder_browser(layout, label, prop_origin, target_property): + row = layout.row() + row.label(text=label) + + '''box = row.box() + box.scale_y = 0.5 + box.label(text=value)''' + + col = row.column() + col.enabled = False + col.prop(prop_origin, target_property, text="") + + folder_selector = row.operator("blenvy.assets_paths_browse", icon="FILE_FOLDER", text="") + folder_selector.target_property = target_property #"project_root_path" + +# side panel +class BLENVY_PT_SidePanel(bpy.types.Panel): + bl_idname = "BLENVY_PT_SidePanel" + bl_label = "" + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_category = "Blenvy" + #bl_context = "objectmode" + + def draw_header(self, context): + layout = self.layout + layout.label(text="Blenvy") + + def draw(self, context): + layout = self.layout + row = layout.row() + blenvy = context.window_manager.blenvy + active_mode = blenvy.mode + world_scene_active = False + library_scene_active = False + active_collection = context.collection + + """print("BLA", blenvy.assets_path_full) + print("BLA", blenvy.blueprints_path_full) + print("BLA", blenvy.levels_path_full) + print("BLA", blenvy.materials_path_full)""" + + # Now to actual drawing of the UI + target = row.box() if active_mode == 'COMPONENTS' else row + tool_switch_components = target.operator(operator="bevy.tooling_switch", text="", icon="PROPERTIES") + tool_switch_components.tool = "COMPONENTS" + + target = row.box() if active_mode == 'BLUEPRINTS' else row + tool_switch_components = target.operator(operator="bevy.tooling_switch", text="", icon="PACKAGE") + tool_switch_components.tool = "BLUEPRINTS" + + target = row.box() if active_mode == 'LEVELS' else row + tool_switch_components = target.operator(operator="bevy.tooling_switch", text="", icon="ASSET_MANAGER") + tool_switch_components.tool = "LEVELS" + + '''target = row.box() if active_mode == 'ASSETS' else row + tool_switch_components = target.operator(operator="bevy.tooling_switch", text="", icon="ASSET_MANAGER") + tool_switch_components.tool = "ASSETS"''' + + target = row.box() if active_mode == 'SETTINGS' else row + tool_switch_components = target.operator(operator="bevy.tooling_switch", text="", icon="SETTINGS") + tool_switch_components.tool = "SETTINGS" + + target = row.box() if active_mode == 'TOOLS' else row + tool_switch_components = target.operator(operator="bevy.tooling_switch", text="", icon="TOOL_SETTINGS") + tool_switch_components.tool = "TOOLS" + + if blenvy.mode == "SETTINGS": + config_mode = blenvy.config_mode + row = layout.row() + config_target = row.box() if config_mode == 'COMMON' else row + config_switch = config_target.operator(operator="bevy.config_switch", text="", icon="OPTIONS") + config_switch.tool = "COMMON" + + config_target = row.box() if config_mode == 'COMPONENTS' else row + config_switch = config_target.operator(operator="bevy.config_switch", text="", icon="PROPERTIES") + config_switch.tool = "COMPONENTS" + + config_target = row.box() if config_mode == 'EXPORT' else row + config_switch = config_target.operator(operator="bevy.config_switch", text="", icon="EXPORT") + config_switch.tool = "EXPORT" + + if config_mode == 'COMMON': + header, panel = layout.panel("common", default_closed=False) + header.label(text="Common") + if panel: + draw_common_settings_ui(panel, blenvy) + + if config_mode == 'COMPONENTS': + header, panel = layout.panel("components", default_closed=False) + header.label(text="Components") + if panel: + components_ui.draw_settings_ui(panel, blenvy.components) + + if config_mode == 'EXPORT': + header, panel = layout.panel("auto_export", default_closed=False) + header.label(text="Export") + if panel: + auto_export_ui.draw_settings_ui(panel, blenvy.auto_export) + + + + +def draw_common_settings_ui(layout, settings): + blenvy = settings + row = layout.row() + draw_folder_browser(layout=row, label="Root Folder", prop_origin=blenvy, target_property="project_root_path") + row = layout.row() + draw_folder_browser(layout=row, label="Assets Folder", prop_origin=blenvy, target_property="assets_path") + row = layout.row() + draw_folder_browser(layout=row, label="Blueprints Folder", prop_origin=blenvy, target_property="blueprints_path") + row = layout.row() + draw_folder_browser(layout=row, label="Levels Folder", prop_origin=blenvy, target_property="levels_path") + row = layout.row() + draw_folder_browser(layout=row, label="Materials Folder", prop_origin=blenvy, target_property="materials_path") + + layout.separator() + # scenes selection + if len(blenvy.level_scenes) == 0 and len(blenvy.library_scenes) == 0: + row = layout.row() + row.alert = True + layout.alert = True + row.label(text="NO library or level scenes specified! at least one level scene or library scene is required!") + row = layout.row() + row.label(text="Please select and add at least one:") + + section = layout + rows = 2 + row = section.row() + col = row.column() + col.label(text="level scenes") + col = row.column() + col.prop(blenvy, "level_scene_selector", text='') + col = row.column() + add_operator = col.operator("blenvy.scenes_list_actions", icon='ADD', text="") + add_operator.action = 'ADD' + add_operator.scene_type = 'LEVEL' + col.enabled = blenvy.level_scene_selector is not None + + + row = section.row() + col = row.column() + for scene in blenvy.level_scenes: + sub_row = col.box().row() + sub_row.label(text=scene.name) + remove_operator = sub_row.operator("blenvy.scenes_list_actions", icon='TRASH', text="") + remove_operator.action = 'REMOVE' + remove_operator.scene_type = 'LEVEL' + remove_operator.scene_name = scene.name + + col.separator() + + # library scenes + row = section.row() + + col = row.column() + col.label(text="library scenes") + col = row.column() + col.prop(blenvy, "library_scene_selector", text='') + col = row.column() + add_operator = col.operator("blenvy.scenes_list_actions", icon='ADD', text="") + add_operator.action = 'ADD' + add_operator.scene_type = 'LIBRARY' + col.enabled = blenvy.library_scene_selector is not None + + row = section.row() + col = row.column() + for scene in blenvy.library_scenes: + sub_row = col.box().row() + sub_row.label(text=scene.name) + remove_operator = sub_row.operator("blenvy.scenes_list_actions", icon='TRASH', text="") + remove_operator.action = 'REMOVE' + remove_operator.scene_type = 'LEVEL' + remove_operator.scene_name = scene.name + col.separator() \ No newline at end of file diff --git a/tools/gltf_auto_export/docs/blender_addon_add_scene.png b/tools/blenvy/docs/auto_export/blender_addon_add_scene.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_add_scene.png rename to tools/blenvy/docs/auto_export/blender_addon_add_scene.png diff --git a/tools/gltf_auto_export/docs/blender_addon_add_scene2.png b/tools/blenvy/docs/auto_export/blender_addon_add_scene2.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_add_scene2.png rename to tools/blenvy/docs/auto_export/blender_addon_add_scene2.png diff --git a/tools/gltf_auto_export/docs/blender_addon_add_scene3.png b/tools/blenvy/docs/auto_export/blender_addon_add_scene3.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_add_scene3.png rename to tools/blenvy/docs/auto_export/blender_addon_add_scene3.png diff --git a/tools/gltf_auto_export/docs/blender_addon_install2.png b/tools/blenvy/docs/auto_export/blender_addon_install2.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_install2.png rename to tools/blenvy/docs/auto_export/blender_addon_install2.png diff --git a/tools/gltf_auto_export/docs/blender_addon_install_zip.png b/tools/blenvy/docs/auto_export/blender_addon_install_zip.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_install_zip.png rename to tools/blenvy/docs/auto_export/blender_addon_install_zip.png diff --git a/tools/gltf_auto_export/docs/blender_addon_materials.png b/tools/blenvy/docs/auto_export/blender_addon_materials.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_materials.png rename to tools/blenvy/docs/auto_export/blender_addon_materials.png diff --git a/tools/gltf_auto_export/docs/blender_addon_materials2.png b/tools/blenvy/docs/auto_export/blender_addon_materials2.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_materials2.png rename to tools/blenvy/docs/auto_export/blender_addon_materials2.png diff --git a/tools/gltf_auto_export/docs/blender_addon_use.png b/tools/blenvy/docs/auto_export/blender_addon_use.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_use.png rename to tools/blenvy/docs/auto_export/blender_addon_use.png diff --git a/tools/gltf_auto_export/docs/blender_addon_use2.png b/tools/blenvy/docs/auto_export/blender_addon_use2.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_use2.png rename to tools/blenvy/docs/auto_export/blender_addon_use2.png diff --git a/tools/gltf_auto_export/docs/blender_addon_use3.png b/tools/blenvy/docs/auto_export/blender_addon_use3.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_use3.png rename to tools/blenvy/docs/auto_export/blender_addon_use3.png diff --git a/tools/gltf_auto_export/docs/blender_addon_use4.png b/tools/blenvy/docs/auto_export/blender_addon_use4.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_use4.png rename to tools/blenvy/docs/auto_export/blender_addon_use4.png diff --git a/tools/gltf_auto_export/docs/combine_override.png b/tools/blenvy/docs/auto_export/combine_override.png similarity index 100% rename from tools/gltf_auto_export/docs/combine_override.png rename to tools/blenvy/docs/auto_export/combine_override.png diff --git a/tools/gltf_auto_export/docs/exported_collections.png b/tools/blenvy/docs/auto_export/exported_collections.png similarity index 100% rename from tools/gltf_auto_export/docs/exported_collections.png rename to tools/blenvy/docs/auto_export/exported_collections.png diff --git a/tools/gltf_auto_export/docs/exported_library_files.png b/tools/blenvy/docs/auto_export/exported_library_files.png similarity index 100% rename from tools/gltf_auto_export/docs/exported_library_files.png rename to tools/blenvy/docs/auto_export/exported_library_files.png diff --git a/tools/gltf_auto_export/docs/force_export.jpg b/tools/blenvy/docs/auto_export/force_export.jpg similarity index 100% rename from tools/gltf_auto_export/docs/force_export.jpg rename to tools/blenvy/docs/auto_export/force_export.jpg diff --git a/tools/gltf_auto_export/docs/nested_blueprints.png b/tools/blenvy/docs/auto_export/nested_blueprints.png similarity index 100% rename from tools/gltf_auto_export/docs/nested_blueprints.png rename to tools/blenvy/docs/auto_export/nested_blueprints.png diff --git a/tools/gltf_auto_export/docs/nested_blueprints2.png b/tools/blenvy/docs/auto_export/nested_blueprints2.png similarity index 100% rename from tools/gltf_auto_export/docs/nested_blueprints2.png rename to tools/blenvy/docs/auto_export/nested_blueprints2.png diff --git a/tools/gltf_auto_export/docs/nested_blueprints3.png b/tools/blenvy/docs/auto_export/nested_blueprints3.png similarity index 100% rename from tools/gltf_auto_export/docs/nested_blueprints3.png rename to tools/blenvy/docs/auto_export/nested_blueprints3.png diff --git a/tools/gltf_auto_export/docs/options.svg b/tools/blenvy/docs/auto_export/options.svg similarity index 100% rename from tools/gltf_auto_export/docs/options.svg rename to tools/blenvy/docs/auto_export/options.svg diff --git a/tools/gltf_auto_export/docs/process.svg b/tools/blenvy/docs/auto_export/process.svg similarity index 100% rename from tools/gltf_auto_export/docs/process.svg rename to tools/blenvy/docs/auto_export/process.svg diff --git a/tools/gltf_auto_export/docs/purge_orphan1_data1.png b/tools/blenvy/docs/auto_export/purge_orphan1_data1.png similarity index 100% rename from tools/gltf_auto_export/docs/purge_orphan1_data1.png rename to tools/blenvy/docs/auto_export/purge_orphan1_data1.png diff --git a/tools/gltf_auto_export/docs/purge_orphan1_data2.png b/tools/blenvy/docs/auto_export/purge_orphan1_data2.png similarity index 100% rename from tools/gltf_auto_export/docs/purge_orphan1_data2.png rename to tools/blenvy/docs/auto_export/purge_orphan1_data2.png diff --git a/tools/gltf_auto_export/docs/purge_orphan1_data3.png b/tools/blenvy/docs/auto_export/purge_orphan1_data3.png similarity index 100% rename from tools/gltf_auto_export/docs/purge_orphan1_data3.png rename to tools/blenvy/docs/auto_export/purge_orphan1_data3.png diff --git a/tools/gltf_auto_export/docs/workflow_empties.jpg b/tools/blenvy/docs/auto_export/workflow_empties.jpg similarity index 100% rename from tools/gltf_auto_export/docs/workflow_empties.jpg rename to tools/blenvy/docs/auto_export/workflow_empties.jpg diff --git a/tools/gltf_auto_export/docs/workflow_original.jpg b/tools/blenvy/docs/auto_export/workflow_original.jpg similarity index 100% rename from tools/gltf_auto_export/docs/workflow_original.jpg rename to tools/blenvy/docs/auto_export/workflow_original.jpg diff --git a/tools/gltf_auto_export/docs/blender_addon_install.png b/tools/blenvy/docs/blender_addon_install.png similarity index 100% rename from tools/gltf_auto_export/docs/blender_addon_install.png rename to tools/blenvy/docs/blender_addon_install.png diff --git a/tools/blenvy/docs/blenvy_configuration_common.png b/tools/blenvy/docs/blenvy_configuration_common.png new file mode 100644 index 0000000..1b31313 Binary files /dev/null and b/tools/blenvy/docs/blenvy_configuration_common.png differ diff --git a/tools/blenvy/docs/blenvy_configuration_components.png b/tools/blenvy/docs/blenvy_configuration_components.png new file mode 100644 index 0000000..5cbf304 Binary files /dev/null and b/tools/blenvy/docs/blenvy_configuration_components.png differ diff --git a/tools/blenvy/docs/blenvy_configuration_export.png b/tools/blenvy/docs/blenvy_configuration_export.png new file mode 100644 index 0000000..d3ff10e Binary files /dev/null and b/tools/blenvy/docs/blenvy_configuration_export.png differ diff --git a/tools/blenvy/docs/blenvy_recommended_folder_structure.png b/tools/blenvy/docs/blenvy_recommended_folder_structure.png new file mode 100644 index 0000000..5e98616 Binary files /dev/null and b/tools/blenvy/docs/blenvy_recommended_folder_structure.png differ diff --git a/tools/blenvy/docs/blenvy_recommended_folder_structure_art.png b/tools/blenvy/docs/blenvy_recommended_folder_structure_art.png new file mode 100644 index 0000000..55a6298 Binary files /dev/null and b/tools/blenvy/docs/blenvy_recommended_folder_structure_art.png differ diff --git a/tools/blenvy/docs/blenvy_recommended_folder_structure_assets.png b/tools/blenvy/docs/blenvy_recommended_folder_structure_assets.png new file mode 100644 index 0000000..1bf9852 Binary files /dev/null and b/tools/blenvy/docs/blenvy_recommended_folder_structure_assets.png differ diff --git a/tools/blenvy/docs/blenvy_ui_location.png b/tools/blenvy/docs/blenvy_ui_location.png new file mode 100644 index 0000000..9c3d701 Binary files /dev/null and b/tools/blenvy/docs/blenvy_ui_location.png differ diff --git a/tools/bevy_components/docs/add_component.png b/tools/blenvy/docs/components/add_component.png similarity index 100% rename from tools/bevy_components/docs/add_component.png rename to tools/blenvy/docs/components/add_component.png diff --git a/tools/bevy_components/docs/blender_addon_install.png b/tools/blenvy/docs/components/blender_addon_install.png similarity index 100% rename from tools/bevy_components/docs/blender_addon_install.png rename to tools/blenvy/docs/components/blender_addon_install.png diff --git a/tools/bevy_components/docs/blender_addon_install2.png b/tools/blenvy/docs/components/blender_addon_install2.png similarity index 100% rename from tools/bevy_components/docs/blender_addon_install2.png rename to tools/blenvy/docs/components/blender_addon_install2.png diff --git a/tools/bevy_components/docs/blender_addon_install_zip.png b/tools/blenvy/docs/components/blender_addon_install_zip.png similarity index 100% rename from tools/bevy_components/docs/blender_addon_install_zip.png rename to tools/blenvy/docs/components/blender_addon_install_zip.png diff --git a/tools/bevy_components/docs/complex_components2.png b/tools/blenvy/docs/components/complex_components2.png similarity index 100% rename from tools/bevy_components/docs/complex_components2.png rename to tools/blenvy/docs/components/complex_components2.png diff --git a/tools/bevy_components/docs/component_remove_single.png b/tools/blenvy/docs/components/component_remove_single.png similarity index 100% rename from tools/bevy_components/docs/component_remove_single.png rename to tools/blenvy/docs/components/component_remove_single.png diff --git a/tools/bevy_components/docs/component_rename_object_select.png b/tools/blenvy/docs/components/component_rename_object_select.png similarity index 100% rename from tools/bevy_components/docs/component_rename_object_select.png rename to tools/blenvy/docs/components/component_rename_object_select.png diff --git a/tools/bevy_components/docs/component_rename_overview2.png b/tools/blenvy/docs/components/component_rename_overview2.png similarity index 100% rename from tools/bevy_components/docs/component_rename_overview2.png rename to tools/blenvy/docs/components/component_rename_overview2.png diff --git a/tools/bevy_components/docs/component_rename_remove_bulk.png b/tools/blenvy/docs/components/component_rename_remove_bulk.png similarity index 100% rename from tools/bevy_components/docs/component_rename_remove_bulk.png rename to tools/blenvy/docs/components/component_rename_remove_bulk.png diff --git a/tools/bevy_components/docs/component_rename_remove_bulk2.png b/tools/blenvy/docs/components/component_rename_remove_bulk2.png similarity index 100% rename from tools/bevy_components/docs/component_rename_remove_bulk2.png rename to tools/blenvy/docs/components/component_rename_remove_bulk2.png diff --git a/tools/bevy_components/docs/component_rename_single.png b/tools/blenvy/docs/components/component_rename_single.png similarity index 100% rename from tools/bevy_components/docs/component_rename_single.png rename to tools/blenvy/docs/components/component_rename_single.png diff --git a/tools/bevy_components/docs/components_list.png b/tools/blenvy/docs/components/components_list.png similarity index 100% rename from tools/bevy_components/docs/components_list.png rename to tools/blenvy/docs/components/components_list.png diff --git a/tools/bevy_components/docs/components_list2.png b/tools/blenvy/docs/components/components_list2.png similarity index 100% rename from tools/bevy_components/docs/components_list2.png rename to tools/blenvy/docs/components/components_list2.png diff --git a/tools/bevy_components/docs/configuration.png b/tools/blenvy/docs/components/configuration.png similarity index 100% rename from tools/bevy_components/docs/configuration.png rename to tools/blenvy/docs/components/configuration.png diff --git a/tools/bevy_components/docs/configuration2.png b/tools/blenvy/docs/components/configuration2.png similarity index 100% rename from tools/bevy_components/docs/configuration2.png rename to tools/blenvy/docs/components/configuration2.png diff --git a/tools/bevy_components/docs/configuration3.png b/tools/blenvy/docs/components/configuration3.png similarity index 100% rename from tools/bevy_components/docs/configuration3.png rename to tools/blenvy/docs/components/configuration3.png diff --git a/tools/bevy_components/docs/copy_component.png b/tools/blenvy/docs/components/copy_component.png similarity index 100% rename from tools/bevy_components/docs/copy_component.png rename to tools/blenvy/docs/components/copy_component.png diff --git a/tools/bevy_components/docs/edit_component.png b/tools/blenvy/docs/components/edit_component.png similarity index 100% rename from tools/bevy_components/docs/edit_component.png rename to tools/blenvy/docs/components/edit_component.png diff --git a/tools/bevy_components/docs/edit_component2.png b/tools/blenvy/docs/components/edit_component2.png similarity index 100% rename from tools/bevy_components/docs/edit_component2.png rename to tools/blenvy/docs/components/edit_component2.png diff --git a/tools/bevy_components/docs/enums.png b/tools/blenvy/docs/components/enums.png similarity index 100% rename from tools/bevy_components/docs/enums.png rename to tools/blenvy/docs/components/enums.png diff --git a/tools/bevy_components/docs/enums2.png b/tools/blenvy/docs/components/enums2.png similarity index 100% rename from tools/bevy_components/docs/enums2.png rename to tools/blenvy/docs/components/enums2.png diff --git a/tools/bevy_components/docs/filter_components.png b/tools/blenvy/docs/components/filter_components.png similarity index 100% rename from tools/bevy_components/docs/filter_components.png rename to tools/blenvy/docs/components/filter_components.png diff --git a/tools/bevy_components/docs/generate_components.png b/tools/blenvy/docs/components/generate_components.png similarity index 100% rename from tools/bevy_components/docs/generate_components.png rename to tools/blenvy/docs/components/generate_components.png diff --git a/tools/bevy_components/docs/generate_components2.png b/tools/blenvy/docs/components/generate_components2.png similarity index 100% rename from tools/bevy_components/docs/generate_components2.png rename to tools/blenvy/docs/components/generate_components2.png diff --git a/tools/bevy_components/docs/generate_components3.png b/tools/blenvy/docs/components/generate_components3.png similarity index 100% rename from tools/bevy_components/docs/generate_components3.png rename to tools/blenvy/docs/components/generate_components3.png diff --git a/tools/bevy_components/docs/invalid_components.png b/tools/blenvy/docs/components/invalid_components.png similarity index 100% rename from tools/bevy_components/docs/invalid_components.png rename to tools/blenvy/docs/components/invalid_components.png diff --git a/tools/bevy_components/docs/missing_registry_data.png b/tools/blenvy/docs/components/missing_registry_data.png similarity index 100% rename from tools/bevy_components/docs/missing_registry_data.png rename to tools/blenvy/docs/components/missing_registry_data.png diff --git a/tools/bevy_components/docs/other_options.png b/tools/blenvy/docs/components/other_options.png similarity index 100% rename from tools/bevy_components/docs/other_options.png rename to tools/blenvy/docs/components/other_options.png diff --git a/tools/bevy_components/docs/other_options2.png b/tools/blenvy/docs/components/other_options2.png similarity index 100% rename from tools/bevy_components/docs/other_options2.png rename to tools/blenvy/docs/components/other_options2.png diff --git a/tools/bevy_components/docs/paste_component.png b/tools/blenvy/docs/components/paste_component.png similarity index 100% rename from tools/bevy_components/docs/paste_component.png rename to tools/blenvy/docs/components/paste_component.png diff --git a/tools/bevy_components/docs/registry_polling.png b/tools/blenvy/docs/components/registry_polling.png similarity index 100% rename from tools/bevy_components/docs/registry_polling.png rename to tools/blenvy/docs/components/registry_polling.png diff --git a/tools/bevy_components/docs/toggle_details.png b/tools/blenvy/docs/components/toggle_details.png similarity index 100% rename from tools/bevy_components/docs/toggle_details.png rename to tools/blenvy/docs/components/toggle_details.png diff --git a/tools/bevy_components/docs/unregistered_types.png b/tools/blenvy/docs/components/unregistered_types.png similarity index 100% rename from tools/bevy_components/docs/unregistered_types.png rename to tools/blenvy/docs/components/unregistered_types.png diff --git a/tools/bevy_components/docs/update_ui_from_custom_properties.png b/tools/blenvy/docs/components/update_ui_from_custom_properties.png similarity index 100% rename from tools/bevy_components/docs/update_ui_from_custom_properties.png rename to tools/blenvy/docs/components/update_ui_from_custom_properties.png diff --git a/tools/bevy_components/docs/vecs_lists.png b/tools/blenvy/docs/components/vecs_lists.png similarity index 100% rename from tools/bevy_components/docs/vecs_lists.png rename to tools/blenvy/docs/components/vecs_lists.png diff --git a/tools/blenvy/levels/__init__.py b/tools/blenvy/levels/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/levels/operators.py b/tools/blenvy/levels/operators.py new file mode 100644 index 0000000..41824c4 --- /dev/null +++ b/tools/blenvy/levels/operators.py @@ -0,0 +1,25 @@ +import os +import bpy +from bpy_types import (Operator) +from bpy.props import (StringProperty) + +class BLENVY_OT_level_select(Operator): + """Select level """ + bl_idname = "blenvy.level_select" + bl_label = "Select level" + bl_options = {"UNDO"} + + level_name: StringProperty( + name="level name", + description="level to select", + ) # type: ignore + + def execute(self, context): + if self.level_name: + scene = bpy.data.scenes[self.level_name] + if scene: + # bpy.ops.object.select_all(action='DESELECT') + bpy.context.window.scene = scene + + return {'FINISHED'} + \ No newline at end of file diff --git a/tools/blenvy/levels/ui.py b/tools/blenvy/levels/ui.py new file mode 100644 index 0000000..7e5ec89 --- /dev/null +++ b/tools/blenvy/levels/ui.py @@ -0,0 +1,61 @@ +from types import SimpleNamespace +import bpy +from ..assets.asset_helpers import get_generated_assets, get_user_assets +from ..assets.ui import draw_assets +from ..blueprints.ui import draw_blueprints + +class BLENVY_PT_levels_panel(bpy.types.Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_label = "" + bl_parent_id = "BLENVY_PT_SidePanel" + bl_options = {'DEFAULT_CLOSED','HIDE_HEADER'} + + @classmethod + def poll(cls, context): + return context.window_manager.blenvy.mode == 'LEVELS' + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False # No animation. + blenvy = context.window_manager.blenvy + layout.operator(operator="blenvy.assets_generate_files", text="Generate") + + asset_registry = context.window_manager.assets_registry + blueprints_registry = context.window_manager.blueprints_registry + #blueprints_registry.refresh_blueprints() + blueprints_data = blueprints_registry.blueprints_data + + for scene in blenvy.level_scenes: + header, panel = layout.box().panel(f"level_assets{scene.name}", default_closed=False) + if header: + header.label(text=scene.name)#, icon="HIDE_OFF") + header.prop(scene, "always_export") + select_level = header.operator(operator="blenvy.level_select", text="", icon="RESTRICT_SELECT_OFF") + select_level.level_name = scene.name + + if panel: + user_assets = get_user_assets(scene) + generated_assets = get_generated_assets(scene) + row = panel.row() + #row.label(text="row") + """col = row.column() + col.label(text=" ") + + col = row.column() + col.label(text="col in row 2") + + column = panel.column() + column.label(text="col")""" + + split = panel.split(factor=0.005) + col = split.column() + col.label(text=" ") + col = split.column() + + scene_assets_panel = draw_assets(layout=col, name=f"{scene.name}_assets", title=f"Assets", asset_registry=asset_registry, user_assets=user_assets, generated_assets=generated_assets, target_type="SCENE", target_name=scene.name) + scene_blueprints_panel = draw_blueprints(layout=col, name=f"{scene.name}_blueprints", title=f"Blueprints", generated_assets=generated_assets, ) + + settings = {"blueprints_path": "blueprints", "export_gltf_extension": ".glb"} + settings = SimpleNamespace(**settings) diff --git a/tools/blenvy/materials/__init__.py b/tools/blenvy/materials/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/blenvy/materials/materials_helpers.py b/tools/blenvy/materials/materials_helpers.py new file mode 100644 index 0000000..4c2c2ab --- /dev/null +++ b/tools/blenvy/materials/materials_helpers.py @@ -0,0 +1,73 @@ +import os +import bpy +from pathlib import Path +from ..core.helpers_collections import (traverse_tree) + +# get materials per object, and injects the materialInfo component +def get_materials(object, materials_per_object): + material_slots = object.material_slots + used_materials_names = [] + + for m in material_slots: + material = m.material + # print(" slot", m, "material", material) + used_materials_names.append(material.name) + # TODO:, also respect slots & export multiple materials if applicable ! + materials_per_object[object] = material + return used_materials_names + + +def get_all_materials(collection_names, library_scenes): + used_material_names = [] + materials_per_object = {} + + for scene in library_scenes: + root_collection = scene.collection + for cur_collection in traverse_tree(root_collection): + if cur_collection.name in collection_names: + for object in cur_collection.all_objects: + used_material_names = used_material_names + get_materials(object, materials_per_object) + + # we only want unique names + used_material_names = list(set(used_material_names)) + return (used_material_names, materials_per_object) + +def add_material_info_to_objects(materials_per_object, settings): + materials_path = getattr(settings, "materials_path") + export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb") + + current_project_name = Path(bpy.context.blend_data.filepath).stem + materials_library_name = f"{current_project_name}_materials" + materials_exported_path = os.path.join(materials_path, f"{materials_library_name}{export_gltf_extension}") + for object in materials_per_object.keys(): + material = materials_per_object[object] + # TODO: switch to using actual components ? + materials_exported_path = os.path.join(materials_path, f"{materials_library_name}{export_gltf_extension}") + object['MaterialInfo'] = f'(name: "{material.name}", path: "{materials_exported_path}")' + + +# get all the materials of all objects in a given scene +def get_scene_materials(scene): + used_material_names = [] + materials_per_object = {} + + root_collection = scene.collection + for cur_collection in traverse_tree(root_collection): + for object in cur_collection.all_objects: + used_material_names = used_material_names + get_materials(object, materials_per_object) + + # we only want unique names + used_material_names = list(set(used_material_names)) + return (used_material_names, materials_per_object) + +# get all the materials of all objects used by a given blueprint +def get_blueprint_materials(blueprint): + materials_per_object = {} + used_material_names = [] + + for object in blueprint.collection.all_objects: + used_material_names = used_material_names + get_materials(object, materials_per_object) + + # we only want unique names + used_material_names = list(set(used_material_names)) + return (used_material_names, materials_per_object) diff --git a/tools/gltf_auto_export/README.md b/tools/blenvy/old.md similarity index 55% rename from tools/gltf_auto_export/README.md rename to tools/blenvy/old.md index 61076b5..0f89b2a 100644 --- a/tools/gltf_auto_export/README.md +++ b/tools/blenvy/old.md @@ -1,35 +1,3 @@ -# gltf_auto_export - -This [Blender addon](./) -- automatically exports your level/world from Blender to gltf whenever you save your Blend file. -- in Blueprints mode (highly recommended !) : - - supports automatic exports of used collections as [Gltf blueprints](../../crates/bevy_gltf_blueprints/README.md) - - supports any number of main/level scenes - - Blender scenes where you define your levels, and all collection instances are replaced with "pointers" to other gltf files (all automatic) - - supports any number of library scenes - - Blender scenes where you define the assets that you use in your levels, in the form of collections - - automatic export of **changed** objects & collections only ! a sort of "incremental export", where only the changed collections (if in use) - get exported when you save your blend file - - -## Installation: - - -* grab the latest release zip file - -![blender addon install](./docs/blender_addon_install_zip.png) - - -* in Blender go to edit => preferences => install - -![blender addon install](./docs/blender_addon_install.png) - -* choose the path where ```gltf_auto_export.zip``` is stored - -![blender addon install](./docs/blender_addon_install2.png) - - - ## Usage: @@ -120,12 +88,6 @@ This issue has been resolved in v0.9. - materials path: where to export materials to - - Legacy mode for bevy: the export of custom properties is slightly different - when using bevy_gltf_components or bevy_gltf_blueprints with ```legacy_mode``` turned on (the default currently), toggle this on to keep using the older variant - - > tldr: legacy mode in this add on should match your use of legacy mode on the Bevy side - > if you use the ```bevy_components``` add-on **legacy mode** should be turned **OFF** - * and your standard gltf export parameters in the **gltf** panel ![blender addon use2](./docs/blender_addon_use2.png) @@ -136,23 +98,23 @@ This issue has been resolved in v0.9. ### Blueprints -You can enable this option to automatically replace all the **collection instances** inside your main scene with blueprints -- whenever you change your main scene (or your library scene , if that option is enabled), all your collection instances +You can enable this option to automatically replace all the **collection instances** inside your level scene with blueprints +- whenever you change your level scene (or your library scene , if that option is enabled), all your collection instances * will be replaced with empties (this will not be visible to you) - * those empties will have additional custom properties / components : ```BlueprintName``` & ```SpawnHere``` - * your main scene/ level will be exported to a much more trimmed down gltf file (see next point) + * those empties will have additional custom properties / components : ```BlueprintInfo``` & ```SpawnBlueprint``` + * your level scene/ level will be exported to a much more trimmed down gltf file (see next point) * all the original collections (that you used to create the instances) will be exported as **seperate gltf files** into the "library" folder - this means you will have * one small main gltf file (your level/world) - * as many gltf files as you have used collections in the main scene , in the library path you specified : + * as many gltf files as you have used collections in the level scene , in the library path you specified : for the included [basic](../../examples/bevy_gltf_blueprints/basic/) example's [assets](../../examples/bevy_gltf_blueprints/basic/assets/), it looks something like this: ![library](./docs/exported_library_files.png) the .blend file that they are generated from can be found [here](../../examples/bevy_gltf_blueprints/basic/assets/advanced.blend) -- the above only applies to collections that have **instances** in your main scene! +- the above only applies to collections that have **instances** in your level scene! if you want a specific collection in your library to always get exported regardless of its use, you need to add a **COLLECTION** (boolean) custom property called ```AutoExport``` set to true > not at the object level ! the collection level ! @@ -178,7 +140,6 @@ To maximise reuse of meshes/components etc, you can also nest ***collections ins ![instance combine mode](./docs/blender_addon_use4.png) - - To make things clearer: ![nested-blueprints](./docs/nested_blueprints.png) @@ -205,79 +166,141 @@ To maximise reuse of meshes/components etc, you can also nest ***collections ins TLDR: smaller, more reuseable blueprints which can share sub-parts with other entities ! -### Materials - -You can enable this option to automatically generate a **material library** file that combines all the materials in use in your blueprints. - -![material_library](./docs/blender_addon_materials2.png) - -Since each blueprint is normally a completely independant gltf file, without this option, if you have a material with a large texture for example, -**ALL** of your blueprints using that material will embed that large texture, leading to **significant bloat & memory use**. -- When this option is enabled, you get a single material library per Blender project, and a **MaterialInfo** component is inserted into each object using a material. -- The correct material will then be inserted on the Bevy side (that loads any number of material libraries that you need) into the correct mesh (see the configuration -options in **bevy_gltf_blueprints** for more information on that) -- Only one material per object is supported at this stage, ie the last material slot's material is the one that is going to be used - -![material_library](./docs/blender_addon_materials.png) - -TLDR: Use this option to make sure that each blueprint file does not contain a copy of the same materials -### Multiple blend file workflow -If you want to use multiple blend files, use Blender's asset library etc, we got you coverred too ! -There are only a few things to keep in mind +### Create components from custom properties -#### Assets/library/blueprints files -- mark your library scenes as specified above, but **do NOT** specify a **main** scene -- mark any collection in your scenes as "assets" (more convenient) or add the "AutoExport" custom property to the collection -- choose "split" for the combine mode (as you want your gltf blueprints to be saved for external use) -- do your Blender things as normal -- anytime you save your file, it will automatically export any relevant collections/blueprints -- (optional) activate the **material library** option, so you only have one set of material per asset library (recomended) +- IF you have a valid component type and the correct corresponding RON string in the custom_property value (this button will not appear if not), this add-on can automatically +generate the corresponding component for you: -#### Level/world files -- mark your main scenes as specified above, but **do NOT** specify a **library** scene -- configure your asset libraries as you would usually do , I recomend using the "link" mode so that any changes to asset files are reflected correctly -- drag & drop any assets from the blueprints library (as you would normally do in Blender as well) -- choose "split" for the combine mode (as you want your gltf blueprints to be external usually & use the gltf files generated from your assets library) -- do your Blender things as normal -- anytime you save your file, it will automatically export your level(s) +- Fill/check your custom property (here for Aabb) + +![generate_components 2](./docs/generate_components2.png) + +- click on the button + +![generate_components](./docs/generate_components.png) + +-voila ! + +![generate_components 3](./docs/generate_components3.png) -Take a look at the [relevant](../../examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/) example for more [details](../../examples/bevy_gltf_blueprints/multiple_levels_multiple_blendfiles/art/) -### Internal Process overview - -This is the internal logic of the export process with blueprints (simplified) - -![process](./docs/process.svg) - -ie this is an example scene... - -![](./docs/workflow_original.jpg) - -and what actually gets exported for the main scene/world/level - -![](./docs/workflow_empties.jpg) - -all collections instances replaced with empties, and all those collections exported to gltf files as seen above -## Development -- since the code has now been split up into multiple modules, to make your life easier, I highly recomend (if you are using vscode like me) to use -[this](https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development) excellent extension , works easilly and fast , even for the latest -versions of Blender (v4.0 as of this writing) -- this [article](https://polynook.com/learn/set-up-blender-addon-development-environment-in-windows) might also help out -(easy enough to get it working on linux too) +## Use -## License -This tool, all its code, contents & assets is Dual-licensed under either of +### Existing components & custom properties + +* If you already have components defined manualy in Blender inside **custom properties** you will need to define them again using the UI! +* avoid mixing & matching: if you change the values of **custom properties** that also have a component, the custom property will be **overriden** every time +you change the component's value +* you can of course still use non component custom properties as always, this add-on will only impact those that have corresponding Bevy components + + + + + + + + + +## Advanced Tools + +In this section you will find various additional more advanced tooling + +### Invalid/unregistered type renaming / conversion + +If you have components that are + * invalid : ie some error was diagnosed + * unregistered: a custom property is present on the object, but there is no matching type in the registry + +Here you will get an overview, of ALL invalid and unregistered components in your Blender project, so you can find them, rename/convert them, +or delete them, also in bulk + +![component rename overview](./docs/component_rename_overview2.png) + +* you can click on the button to select the object in your outliner (this also works across scenes, so you will be taken to the scene where the +given object is located) + +![update custom properties](./docs/component_rename_object_select.png) + + +#### Single object component renaming/ conversion + + - to rename/convert a single component for a single object: + + * go to the row of the object you want to convert the component of + * in the dropdown menu, choose the target component + * click on the button with the magic wand to convert the component + + ![single rename](./docs/component_rename_single.png) + + > the tool will attempt to automatically convert the source component, including the field names/values, if the target component has the same ones + If it fails to do the conversion, you will get an error message, and you will either have to change the custom property yourself, or you can simply + change the values in the UI, which will automatically generate the custom property value + + - to delete a single component for a single object: + + * go to the row of the object you want to remove the component from + * click on the button with the "x" to remove the component + + ![single delete](./docs/component_remove_single.png) + +#### Bulk component renaming/ conversion + + - use this method if you want to convert ALL components of a given type of ALL objects + + * click on this button to pick your source component + + ![bulk convert remove](./docs/component_rename_remove_bulk.png) + + * for conversion: in the dropdown menu, choose the target component & click apply to convert all matching components + * for deletion: clic on the "x" to remove all matching components + + ![bulk convert remove](./docs/component_rename_remove_bulk2.png) + + + ### For conversion between custom properties & components & vice-versa + + #### regenerate custom property values + + - "update custom properties of current object" : will go over **all components** that you have defined for the **currently selected object**, and re-generate the + + corresponding custom property values + + ![update custom properties](./docs/other_options.png) + + + - "update custom properties of ALL objects" : same as above but it will do so for the **ALL objects in your blend file** (so can be slow!), and re-generate the + + corresponding custom property values + + ![update custom properties for all](./docs/other_options2.png) + + > IMPORTANT !! use this if you have previously used v0.1 or v0.2 , as v0.3 had a breaking change, that makes it **necessary** to use this **once** to upgrade components data + You should also re-export your gltf files , otherwise you might run into issues + + + #### regenerate component/ UI values + + - since v0.2, you have the option to regenerate (for the selected object or all objects, as above) to regenerate your UI values from the custom property values + + ![update UI FROM custom properties](./docs/update_ui_from_custom_properties.png) + + > IMPORTANT !! use this if you have previously used v0.1 , as v0.2 had a breaking change, that makes it **necessary** to use this **once** to upgrade the UI data + + + + +## Examples + +you can find an example [here](https://github.com/kaosat-dev/Blender_bevy_components_workflow/tree/main/examples/bevy_registry_export/) -- Apache License, Version 2.0, ([LICENSE-APACHE](../LICENSE_APACHE.md) or https://www.apache.org/licenses/LICENSE-2.0) -- MIT license ([LICENSE-MIT](../LICENSE_MIT.md) or https://opensource.org/licenses/MIT) \ No newline at end of file diff --git a/tools/gltf_auto_export/pytest.ini b/tools/blenvy/pytest.ini similarity index 57% rename from tools/gltf_auto_export/pytest.ini rename to tools/blenvy/pytest.ini index 33c0e52..591ed5c 100644 --- a/tools/gltf_auto_export/pytest.ini +++ b/tools/blenvy/pytest.ini @@ -1,5 +1,5 @@ [pytest] -blender-template = ../../testing/bevy_example/assets/testing.blend +blender-template = ../../testing/bevy_example/art/testing.blend addopts = -svv testpaths = tests diff --git a/tools/blenvy/settings.py b/tools/blenvy/settings.py new file mode 100644 index 0000000..87ac93e --- /dev/null +++ b/tools/blenvy/settings.py @@ -0,0 +1,117 @@ +import json +import bpy + +def upsert_settings(name, data, overwrite=False): + stored_settings = bpy.data.texts[name] if name in bpy.data.texts else None + if stored_settings is None: + stored_settings = bpy.data.texts.new(name) + stored_settings.write(json.dumps(data)) + else: + if overwrite: + stored_settings.clear() + stored_settings.write(json.dumps(data)) + else: + current_settings = json.loads(stored_settings.as_string()) + stored_settings.clear() + current_settings = {**current_settings, **data} + stored_settings.write(json.dumps(current_settings)) + +def load_settings(name): + stored_settings = bpy.data.texts[name] if name in bpy.data.texts else None + if stored_settings is not None: + try: + return json.loads(stored_settings.as_string()) + except: + return None + return None + + +# given the input (actual) settings, filters out any invalid/useless params & params that are equal to defaults +def generate_complete_settings_dict(settings, presets, ignore_list=[], preset_defaults=True): + complete_preferences = {} + defaults = {} + + def filter_out(pair): + key, value = pair + if key in ignore_list: + return False + return True + + for k in presets.__annotations__: + item = presets.__annotations__[k] + default = item.keywords.get('default', None) + if default is not None: + defaults[k] = default + if preset_defaults: + complete_preferences[k] = default + #print("defaults", defaults) + + + for key in list(settings.keys()): + if key in defaults and settings[key] != defaults[key]: # only write out values different from defaults + value = getattr(settings, key, None) # this is needed for most of our settings (PropertyGroups) + if value is None: + value = settings[key] # and this for ...gltf settings + complete_preferences[key] = value + #print("setting", key, value, settings[key], settings) + + + complete_preferences = dict(filter(filter_out, dict(complete_preferences).items())) + + return complete_preferences + + +# checks if old & new settings (dicts really) are identical +def are_settings_identical(old, new, white_list=None): + if old is None and new is None: + return True + if old is None and new is not None: + return False + if old is not None and new is None: + return False + + old_items = sorted(old.items()) + new_items = sorted(new.items()) + + if white_list is not None: + old_items_override = {} + new_items_override = {} + for key in white_list: + if key in old: + old_items_override[key] = old[key] + if key in new: + new_items_override[key] = new[key] + old_items = sorted(old_items_override.items()) + new_items = sorted(new_items_override.items()) + + return old_items == new_items + + +# if one of the changed settings is not in the white list, it gets discarded +def changed_settings(old, new, white_list=[]): + if old is None and new is None: + return [] + if old is None and new is not None: + return new.keys() + if old is not None and new is None: + return [] + + old_items = sorted(old.items()) + new_items = sorted(new.items()) + + result = [] + old_keys = list(old.keys()) + new_keys =list(new.keys()) + added = list(set(new_keys) - set(old_keys)) + removed = list(set(old_keys) - set(new_keys)) + + result += added + result += removed + for key in new.keys(): + if key in old: + if new[key] != old[key]: + result.append(key) + + + + return [key for key in list(set(result)) if key in white_list] diff --git a/tools/blenvy/tests/__init__.py b/tools/blenvy/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/bevy_components/tests/component_values_shuffler.py b/tools/blenvy/tests/component_values_shuffler.py similarity index 83% rename from tools/bevy_components/tests/component_values_shuffler.py rename to tools/blenvy/tests/component_values_shuffler.py index bd71dc4..c662c22 100644 --- a/tools/bevy_components/tests/component_values_shuffler.py +++ b/tools/blenvy/tests/component_values_shuffler.py @@ -63,7 +63,7 @@ type_mappings = { 'bevy_color::srgba::Srgba': lambda : random_vec(4, 'float'), 'bevy_color::linear_rgba::LinearRgba': lambda : random_vec(4, 'float'), - 'bevy_color::hsva::Hsva': lambda : random_vec(4, 'float'), + 'bevy_color::hsva::Hsva': lambda : random_vec(4, 'float'), 'alloc::string::String': lambda : random_word(8), 'alloc::borrow::Cow': lambda : random_word(8), @@ -77,8 +77,8 @@ def is_def_value_type(definition, registry): if definition == None: return True value_types_defaults = registry.value_types_defaults - type_name = definition["title"] - is_value_type = type_name in value_types_defaults + long_name = definition["long_name"] + is_value_type = long_name in value_types_defaults return is_value_type # see https://docs.python.org/3/library/random.html @@ -96,24 +96,24 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi has_prefixItems = len(prefixItems) > 0 is_enum = type_info == "Enum" is_list = type_info == "List" - type_name = definition["title"] + long_name = definition["long_name"] - #is_value_type = type_def in value_types_defaults or type_name in value_types_defaults - is_value_type = type_name in value_types_defaults + #is_value_type = type_def in value_types_defaults or long_name in value_types_defaults + is_value_type = long_name in value_types_defaults if is_value_type: - fieldValue = type_mappings[type_name]() + fieldValue = type_mappings[long_name]() return fieldValue elif type_info == "Struct": for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["properties"][field_name]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["properties"][field_name]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: + if item_definition is not None: value = component_values_shuffler(seed, child_property_group, item_definition, registry, parent=component_name) else: value = '""' @@ -126,13 +126,13 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi #print("tup") for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: + if item_definition is not None: value = component_values_shuffler(seed, child_property_group, item_definition, registry, parent=component_name) else: value = '""' @@ -145,13 +145,13 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi elif type_info == "TupleStruct": #print("tupstruct") for index, field_name in enumerate(property_group.field_names): - item_type_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") - item_definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + item_long_name = definition["prefixItems"][index]["type"]["$ref"].replace("#/$defs/", "") + item_definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None value = getattr(property_group, field_name) is_property_group = isinstance(value, PropertyGroup) child_property_group = value if is_property_group else None - if item_definition != None: + if item_definition is not None: value = component_values_shuffler(seed, child_property_group, item_definition, registry, parent=component_name) else: value = '""' @@ -161,11 +161,11 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi setattr(property_group , field_name, value) elif type_info == "Enum": - available_variants = definition["oneOf"] if type_def != "object" else list(map(lambda x: x["title"], definition["oneOf"])) + available_variants = definition["oneOf"] if type_def != "object" else list(map(lambda x: x["long_name"], definition["oneOf"])) selected = random.choice(available_variants) # set selected variant - setattr(property_group , component_name, selected) + setattr(property_group , "selection", selected) if type_def == "object": selection_index = property_group.field_names.index("variant_"+selected) @@ -196,22 +196,22 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi item_list = getattr(property_group, "list") item_list.clear() - item_type_name = getattr(property_group, "type_name_short") + item_long_name = getattr(property_group, "long_name") number_of_list_items_to_add = random.randint(1, 2) for i in range(0, number_of_list_items_to_add): new_entry = item_list.add() - item_type_name = getattr(new_entry, "type_name") # we get the REAL type name + item_long_name = getattr(new_entry, "long_name") # we get the REAL type name - definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None + definition = registry.type_infos[item_long_name] if item_long_name in registry.type_infos else None - if definition != None: + if definition is not None: component_values_shuffler(seed, new_entry, definition, registry, parent=component_name) else: pass else: print("something else") - fieldValue = type_mappings[type_name]() if type_name in type_mappings else 'None' + fieldValue = type_mappings[long_name]() if long_name in type_mappings else 'None' return fieldValue #return value diff --git a/tools/blenvy/tests/expected_bevy_hierarchy.json b/tools/blenvy/tests/expected_bevy_hierarchy.json new file mode 100644 index 0000000..150da44 --- /dev/null +++ b/tools/blenvy/tests/expected_bevy_hierarchy.json @@ -0,0 +1 @@ +{"Blueprint7_hierarchy.001":["Blueprint4_nested.001","Cube.001"],"Cylinder":["Cylinder.001","Cylinder.001"],"Blueprint8_animated_no_bones":["Cylinder.002"],"Blueprint7_hierarchy":["Cube.001"],"Collection 2":["Blueprint8_animated_no_bones","Collection 2 1","Empty_in_collection","Spot"],"Fox_mesh":["fox1","fox1"],"_rootJoint":["b_Root_00","b_Root_00"],"b_Root_00":["b_Hip_01","b_Hip_01"],"Blueprint1":["Blueprint1_mesh"],"Fox":["Fox_mesh","_rootJoint","Fox_mesh","_rootJoint"],"Light":["Light","DirectionalLight Gizmo"],"b_Spine01_02":["b_Spine02_03","b_Spine02_03"],"b_RightLeg01_019":["b_RightLeg02_020","b_RightLeg02_020"],"b_LeftFoot01_017":["b_LeftFoot02_018","b_LeftFoot02_018"],"b_LeftForeArm_010":["b_LeftHand_011","b_LeftHand_011"],"Collection":["Blueprint1.001","Blueprint4_nested","Blueprint6_animated","Blueprint7_hierarchy","Camera","Cube","Empty","External_blueprint","External_blueprint2","Light","Plane"],"Cylinder.001":["Cylinder.002","Blueprint7_hierarchy.001","Empty_as_child"],"b_Hip_01":["b_Spine01_02","b_Tail01_012","b_LeftLeg01_015","b_RightLeg01_019","b_Spine01_02","b_Tail01_012","b_LeftLeg01_015","b_RightLeg01_019"],"world":["no_name"],"Parent_Object":["Cube.003","Blueprint1","Cylinder.001"],"Blueprint6_animated.001":["Fox"],"Blueprint4_nested":["Blueprint3"],"Blueprint6_animated":["Fox"],"Cube.001":["Cube.002","Cylinder","Cube.002","Cylinder"],"b_Spine02_03":["b_Neck_04","b_RightUpperArm_06","b_LeftUpperArm_09","b_Neck_04","b_RightUpperArm_06","b_LeftUpperArm_09"],"b_LeftLeg01_015":["b_LeftLeg02_016","b_LeftLeg02_016"],"Blueprint4_nested.001":["Blueprint3"],"b_Tail02_013":["b_Tail03_014","b_Tail03_014"],"b_RightForeArm_07":["b_RightHand_08","b_RightHand_08"],"External_blueprint2_Cylinder":["Cylinder"],"Blueprint3":["Blueprint3_mesh","Blueprint3_mesh"],"External_blueprint2":["External_blueprint2_Cylinder","External_blueprint3"],"b_LeftUpperArm_09":["b_LeftForeArm_010","b_LeftForeArm_010"],"Cube":["Cube"],"Plane":["Plane"],"no_name":["Parent_Object","Blueprint6_animated.001","lighting_components_World","assets_list_World_components","Collection","Collection 2"],"Collection 2 1":["Empty_in_sub_collection"],"External_blueprint_mesh":["Cube.001"],"b_LeftLeg02_016":["b_LeftFoot01_017","b_LeftFoot01_017"],"Cylinder.002":["Cylinder.003"],"b_RightLeg02_020":["b_RightFoot01_021","b_RightFoot01_021"],"b_Neck_04":["b_Head_05","b_Head_05"],"b_RightUpperArm_06":["b_RightForeArm_07","b_RightForeArm_07"],"Spot":["Spot"],"External_blueprint3_Cone":["Cone"],"External_blueprint":["External_blueprint_mesh"],"Blueprint3_mesh":["Cylinder","Cylinder"],"External_blueprint3":["External_blueprint3_Cone"],"Camera":["Camera Gizmo"],"Blueprint1_mesh":["Cube.001","Cube.001"],"Blueprint1.001":["Blueprint1_mesh"],"b_Tail01_012":["b_Tail02_013","b_Tail02_013"],"b_RightFoot01_021":["b_RightFoot02_022","b_RightFoot02_022"]} \ No newline at end of file diff --git a/tools/blenvy/tests/expected_component_values.py b/tools/blenvy/tests/expected_component_values.py new file mode 100644 index 0000000..6164a74 --- /dev/null +++ b/tools/blenvy/tests/expected_component_values.py @@ -0,0 +1,553 @@ + + +expected_custom_property_values = {'bevy_animation::AnimationPlayer': '(animation: "", paused: true)', + 'bevy_asset::handle::Handle<()>': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle>': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_audio::audio::PlaybackSettings': '(mode: Once, paused: true, spatial: true, spatial_scale: "", speed: 0.0, ' + 'volume: (0.0))', + 'bevy_audio::audio::SpatialListener': '(left_ear_offset: Vec3(x:0.0, y:0.0, z:0.0), right_ear_offset: Vec3(x:0.0, ' + 'y:0.0, z:0.0))', + 'bevy_core::name::Name': '(hash: 0, name: " ")', + 'bevy_core_pipeline::bloom::settings::BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.0, ' + 'intensity: 0.0, low_frequency_boost: 0.0, ' + 'low_frequency_boost_curvature: 0.0, prefilter_settings: ' + '(threshold: 0.0, threshold_softness: 0.0))', + 'bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: ' + 'true, sharpening_strength: ' + '0.0)', + 'bevy_core_pipeline::core_2d::camera_2d::Camera2d': '()', + 'bevy_core_pipeline::core_3d::camera_3d::Camera3d': '(depth_load_op: Clear(0.0), depth_texture_usages: (0), ' + 'screen_space_specular_transmission_quality: Low, ' + 'screen_space_specular_transmission_steps: 0)', + 'bevy_core_pipeline::fxaa::Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)', + 'bevy_core_pipeline::tonemapping::DebandDither': 'Disabled', + 'bevy_core_pipeline::tonemapping::Tonemapping': 'None', + 'bevy_example::dupe_components::EnumTest': 'Metal', + 'bevy_example::game::animation::Marker1': '()', + 'bevy_example::game::animation::Marker2': '()', + 'bevy_example::game::animation::Marker3': '()', + 'bevy_example::game::animation::MarkerFox': '()', + 'bevy_example::test_components::AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()', + 'bevy_example::test_components::BasicTest': '(a: 0.0, b: 0, c: " ")', + 'bevy_example::test_components::EnumComplex': 'Float(0.0)', + 'bevy_example::test_components::EnumTest': 'Metal', + 'bevy_example::test_components::HashmapTestIntColor': '(inner: {})', + 'bevy_example::test_components::HashmapTestIntString': '(named_animations: {})', + 'bevy_example::test_components::HashmapTestSimple': '(named_animations: {})', + 'bevy_example::test_components::HashmapTestStringColor': '(inner: {})', + 'bevy_example::test_components::HashmapTestStringColorFlat': '({})', + 'bevy_example::test_components::HashmapTestStringFloat': '(named_animations: {})', + 'bevy_example::test_components::NestedTupleStuff': '(0.0, 0, (basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, ' + 'green:1.0, blue:0.0, alpha:1.0)), colors_list: ([]), enable: ' + 'true, enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, ' + 'z:0.0))), text: " ", toggle: (true)))', + 'bevy_example::test_components::NestingTestLevel2': '(basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, green:1.0, ' + 'blue:0.0, alpha:1.0)), colors_list: ([]), enable: true, ' + 'enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, z:0.0))), ' + 'text: " ", toggle: (true))', + 'bevy_example::test_components::NestingTestLevel3': '(vec: (Vec3(x:0.0, y:0.0, z:0.0)))', + 'bevy_example::test_components::TupleTest2': '(0.0, 0, " ")', + 'bevy_example::test_components::TupleTestBool': '(true)', + 'bevy_example::test_components::TupleTestColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', + 'bevy_example::test_components::TupleTestF32': '(0.0)', + 'bevy_example::test_components::TupleTestStr': '(" ")', + 'bevy_example::test_components::TupleTestU64': '(0)', + 'bevy_example::test_components::TupleVec': '([])', + 'bevy_example::test_components::TupleVec2': '(Vec2(x:0.0, y:0.0))', + 'bevy_example::test_components::TupleVec3': '(Vec3(x:0.0, y:0.0, z:0.0))', + 'bevy_example::test_components::TupleVecF32F32': '([])', + 'bevy_example::test_components::UnitTest': '()', + 'bevy_example::test_components::VecOfColors': '([])', + 'bevy_example::test_components::VecOfF32s': '([])', + 'bevy_example::test_components::VecOfVec3s2': '([])', + 'bevy_gltf::GltfExtras': '(value: " ")', + 'bevy_gltf_blueprints::animation::AnimationInfos': '(animations: [])', + 'bevy_gltf_blueprints::animation::AnimationMarkers': '({})', + 'bevy_gltf_blueprints::animation::BlueprintAnimations': '(named_animations: "")', + 'bevy_gltf_blueprints::animation::SceneAnimations': '(named_animations: "")', + 'bevy_gltf_blueprints::materials::MaterialInfo': '(name: " ", source: " ")', + 'bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList': '({})', + 'bevy_gltf_blueprints::spawn_from_blueprints::SpawnBlueprint': '()', + 'bevy_gltf_components::GltfProcessed': '()', + 'bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader': '(color: Rgba(red:1.0, green:1.0, ' + 'blue:0.0, alpha:1.0), strength: 0.0)', + 'bevy_gltf_components::blender_settings::lighting::BlenderLightShadows': '(buffer_bias: 0.0, enabled: true)', + 'bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 0)', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking': '(offset: Vec3(x:0.0, y:0.0, ' + 'z:0.0))', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, ' + 'z:0.0))', + 'bevy_gltf_worlflow_examples_common::game::picking::Pickable': '()', + 'bevy_gltf_worlflow_examples_common::game::player::Player': '()', + 'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider': 'Cuboid', + 'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider': 'Ball(0.0)', + 'bevy_hierarchy::components::children::Children': '([])', + 'bevy_hierarchy::components::parent::Parent': '(0)', + 'bevy_pbr::bundle::CascadesVisibleEntities': '()', + 'bevy_pbr::bundle::CubemapVisibleEntities': '()', + 'bevy_pbr::fog::FogSettings': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_color: ' + 'Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_exponent: 0.0, ' + 'falloff: Linear(end: 0.0, start: 0.0))', + 'bevy_pbr::light::CascadeShadowConfig': '(bounds: [], minimum_distance: 0.0, overlap_proportion: 0.0)', + 'bevy_pbr::light::Cascades': '(cascades: "")', + 'bevy_pbr::light::ClusterConfig': 'None', + 'bevy_pbr::light::DirectionalLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), illuminance: 0.0, ' + 'shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)', + 'bevy_pbr::light::NotShadowCaster': '()', + 'bevy_pbr::light::NotShadowReceiver': '()', + 'bevy_pbr::light::PointLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), intensity: 0.0, radius: 0.0, ' + 'range: 0.0, shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)', + 'bevy_pbr::light::ShadowFilteringMethod': 'Hardware2x2', + 'bevy_pbr::light::SpotLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), inner_angle: 0.0, intensity: ' + '0.0, outer_angle: 0.0, radius: 0.0, range: 0.0, shadow_depth_bias: 0.0, ' + 'shadow_normal_bias: 0.0, shadows_enabled: true)', + 'bevy_pbr::light_probe::LightProbe': '()', + 'bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")', + 'bevy_pbr::wireframe::NoWireframe': '()', + 'bevy_pbr::wireframe::Wireframe': '()', + 'bevy_pbr::wireframe::WireframeColor': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', + 'bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties': 'Mass(0.0)', + 'bevy_rapier3d::dynamics::rigid_body::Ccd': '(enabled: true)', + 'bevy_rapier3d::dynamics::rigid_body::Damping': '(angular_damping: 0.0, linear_damping: 0.0)', + 'bevy_rapier3d::dynamics::rigid_body::Dominance': '(groups: 0)', + 'bevy_rapier3d::dynamics::rigid_body::ExternalForce': '(force: Vec3(x:0.0, y:0.0, z:0.0), torque: Vec3(x:0.0, y:0.0, ' + 'z:0.0))', + 'bevy_rapier3d::dynamics::rigid_body::ExternalImpulse': '(impulse: Vec3(x:0.0, y:0.0, z:0.0), torque_impulse: ' + 'Vec3(x:0.0, y:0.0, z:0.0))', + 'bevy_rapier3d::dynamics::rigid_body::GravityScale': '(0.0)', + 'bevy_rapier3d::dynamics::rigid_body::LockedAxes': '(0)', + 'bevy_rapier3d::dynamics::rigid_body::RigidBody': 'Dynamic', + 'bevy_rapier3d::dynamics::rigid_body::Sleeping': '(angular_threshold: 0.0, linear_threshold: 0.0, sleeping: true)', + 'bevy_rapier3d::dynamics::rigid_body::Velocity': '(angvel: Vec3(x:0.0, y:0.0, z:0.0), linvel: Vec3(x:0.0, y:0.0, ' + 'z:0.0))', + 'bevy_rapier3d::geometry::collider::CollidingEntities': '("")', + 'bevy_rapier3d::geometry::collider::CollisionGroups': '(filters: (0), memberships: (0))', + 'bevy_rapier3d::geometry::collider::ContactForceEventThreshold': '(0.0)', + 'bevy_rapier3d::geometry::collider::Friction': '(coefficient: 0.0, combine_rule: "")', + 'bevy_rapier3d::geometry::collider::Group': '(0)', + 'bevy_rapier3d::geometry::collider::Restitution': '(coefficient: 0.0, combine_rule: "")', + 'bevy_rapier3d::geometry::collider::Sensor': '()', + 'bevy_rapier3d::geometry::collider::SolverGroups': '(filters: (0), memberships: (0))', + 'bevy_render::camera::camera::Camera': '(clear_color: Default, hdr: true, is_active: true, msaa_writeback: true, ' + 'order: 0, viewport: None)', + 'bevy_render::camera::camera::CameraMainTextureUsages': 'None', + 'bevy_render::camera::camera::CameraRenderGraph': 'None', + 'bevy_render::camera::camera::Exposure': 'None', + 'bevy_render::camera::projection::OrthographicProjection': '(area: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, ' + 'y:0.0)), far: 0.0, near: 0.0, scale: 0.0, scaling_mode: ' + 'Fixed(height: 0.0, width: 0.0), viewport_origin: ' + 'Vec2(x:0.0, y:0.0))', + 'bevy_render::camera::projection::PerspectiveProjection': '(aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0)', + 'bevy_render::camera::projection::Projection': 'Perspective((aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0))', + 'bevy_render::mesh::mesh::skinning::SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [])', + 'bevy_render::mesh::morph::MeshMorphWeights': '(weights: [])', + 'bevy_render::mesh::morph::MorphWeights': '(first_mesh: "", weights: [])', + 'bevy_render::primitives::Aabb': '(center: Vec3A(x:0.0, y:0.0, z:0.0), half_extents: Vec3A(x:0.0, y:0.0, z:0.0))', + 'bevy_render::primitives::CascadesFrusta': '()', + 'bevy_render::primitives::CubemapFrusta': '()', + 'bevy_render::primitives::Frustum': '()', + 'bevy_render::view::ColorGrading': '(exposure: 0.0, gamma: 0.0, post_saturation: 0.0, pre_saturation: 0.0)', + 'bevy_render::view::visibility::InheritedVisibility': '(true)', + 'bevy_render::view::visibility::NoFrustumCulling': '()', + 'bevy_render::view::visibility::ViewVisibility': '(true)', + 'bevy_render::view::visibility::Visibility': 'Inherited', + 'bevy_render::view::visibility::VisibleEntities': '()', + 'bevy_render::view::visibility::render_layers::RenderLayers': '(0)', + 'bevy_sprite::mesh2d::mesh::Mesh2dHandle': '(Strong(""))', + 'bevy_sprite::sprite::ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.0, ' + 'sides_scale_mode: ""))', + 'bevy_sprite::sprite::Sprite': '(anchor: Center, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), custom_size: ' + '"", flip_x: true, flip_y: true, rect: "")', + 'bevy_text::pipeline::TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.0, y:0.0))', + 'bevy_text::text2d::Text2dBounds': '(size: Vec2(x:0.0, y:0.0))', + 'bevy_text::text::Text': '(justify: Left, linebreak_behavior: WordBoundary, sections: [])', + 'bevy_transform::components::global_transform::GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.0, y:0.0, z:0.0), ' + 'y_axis: Vec3A(x:0.0, y:0.0, z:0.0), z_axis: ' + 'Vec3A(x:0.0, y:0.0, z:0.0)), translation: ' + 'Vec3A(x:0.0, y:0.0, z:0.0)))', + 'bevy_transform::components::transform::Transform': '(rotation: Quat(x:0.0, y:0.0, z:0.0, w:0.0), scale: Vec3(x:0.0, ' + 'y:0.0, z:0.0), translation: Vec3(x:0.0, y:0.0, z:0.0))', + 'bevy_ui::focus::FocusPolicy': 'Block', + 'bevy_ui::focus::Interaction': 'Pressed', + 'bevy_ui::focus::RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: Vec2(x:0.0, y:0.0), ' + 'min: Vec2(x:0.0, y:0.0)))', + 'bevy_ui::measurement::ContentSize': '()', + 'bevy_ui::ui_node::BackgroundColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', + 'bevy_ui::ui_node::BorderColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))', + 'bevy_ui::ui_node::CalculatedClip': '(clip: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)))', + 'bevy_ui::ui_node::Node': '(calculated_size: Vec2(x:0.0, y:0.0), outline_offset: 0.0, outline_width: 0.0, ' + 'stack_index: 0, unrounded_size: Vec2(x:0.0, y:0.0))', + 'bevy_ui::ui_node::Outline': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), offset: Auto, width: Auto)', + 'bevy_ui::ui_node::Style': '(align_content: Default, align_items: Default, align_self: Auto, aspect_ratio: None, ' + 'border: (bottom: Auto, left: Auto, right: Auto, top: Auto), bottom: Auto, column_gap: ' + 'Auto, direction: Inherit, display: Flex, flex_basis: Auto, flex_direction: Row, ' + 'flex_grow: 0.0, flex_shrink: 0.0, flex_wrap: NoWrap, grid_auto_columns: "", ' + 'grid_auto_flow: Row, grid_auto_rows: "", grid_column: (end: "", span: "", start: ""), ' + 'grid_row: (end: "", span: "", start: ""), grid_template_columns: "", grid_template_rows: ' + '"", height: Auto, justify_content: Default, justify_items: Default, justify_self: Auto, ' + 'left: Auto, margin: (bottom: Auto, left: Auto, right: Auto, top: Auto), max_height: Auto, ' + 'max_width: Auto, min_height: Auto, min_width: Auto, overflow: (x: Visible, y: Visible), ' + 'padding: (bottom: Auto, left: Auto, right: Auto, top: Auto), position_type: Relative, ' + 'right: Auto, row_gap: Auto, top: Auto, width: Auto)', + 'bevy_ui::ui_node::UiImage': '(flip_x: true, flip_y: true, texture: Strong(""))', + 'bevy_ui::ui_node::ZIndex': 'Local(0)', + 'bevy_ui::widget::button::Button': '()', + 'bevy_ui::widget::image::UiImageSize': '(size: Vec2(x:0.0, y:0.0))', + 'bevy_ui::widget::label::Label': '()', + 'bevy_ui::widget::text::TextFlags': '(needs_new_measure_func: true, needs_recompute: true)', + 'bevy_window::window::PrimaryWindow': '()', + 'bevy_window::window::Window': '(canvas: None, composite_alpha_mode: Auto, cursor: (grab_mode: None, hit_test: true, ' + 'icon: Default, visible: true), decorations: true, enabled_buttons: (close: true, ' + 'maximize: true, minimize: true), focused: true, ime_enabled: true, ime_position: ' + 'Vec2(x:0.0, y:0.0), internal: (maximize_request: None, minimize_request: None, ' + 'physical_cursor_position: None), mode: Windowed, name: None, position: Automatic, ' + 'present_mode: AutoVsync, prevent_default_event_handling: true, resizable: true, ' + 'resize_constraints: (max_height: 0.0, max_width: 0.0, min_height: 0.0, min_width: ' + '0.0), resolution: (physical_height: 0, physical_width: 0, scale_factor: 0.0, ' + 'scale_factor_override: None), title: " ", transparent: true, visible: true, ' + 'window_level: AlwaysOnBottom, window_theme: "")'} + + + +expected_custom_property_values_randomized = {'bevy_animation::AnimationPlayer': '(animation: "", paused: true)', + 'bevy_asset::handle::Handle<()>': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle>': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_asset::handle::Handle': 'Strong("")', + 'bevy_audio::audio::PlaybackSettings': '(mode: Once, paused: false, spatial: false, spatial_scale: "", speed: ' + '0.5780913233757019, volume: (0.20609822869300842))', + 'bevy_audio::audio::SpatialListener': '(left_ear_offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019), right_ear_offset: Vec3(x:0.20609822869300842, ' + 'y:0.8133212327957153, z:0.8235888481140137))', + 'bevy_core::name::Name': '(hash: 73, name: "bnpsagop")', + 'bevy_core_pipeline::bloom::settings::BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: ' + '0.42888906598091125, intensity: 0.5780913233757019, ' + 'low_frequency_boost: 0.20609822869300842, ' + 'low_frequency_boost_curvature: 0.8133212327957153, ' + 'prefilter_settings: (threshold: 0.8235888481140137, ' + 'threshold_softness: 0.6534725427627563))', + 'bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: ' + 'false, sharpening_strength: ' + '0.42888906598091125)', + 'bevy_core_pipeline::core_2d::camera_2d::Camera2d': '()', + 'bevy_core_pipeline::core_3d::camera_3d::Camera3d': '(depth_load_op: Clear(0.42888906598091125), ' + 'depth_texture_usages: (73), ' + 'screen_space_specular_transmission_quality: Low, ' + 'screen_space_specular_transmission_steps: 26)', + 'bevy_core_pipeline::fxaa::Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)', + 'bevy_core_pipeline::tonemapping::DebandDither': 'Disabled', + 'bevy_core_pipeline::tonemapping::Tonemapping': 'None', + 'bevy_example::dupe_components::EnumTest': 'Squishy', + 'bevy_example::game::animation::Marker1': '()', + 'bevy_example::game::animation::Marker2': '()', + 'bevy_example::game::animation::Marker3': '()', + 'bevy_example::game::animation::MarkerFox': '()', + 'bevy_example::test_components::AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()', + 'bevy_example::test_components::BasicTest': '(a: 0.5714026093482971, b: 54, c: "psagopiu")', + 'bevy_example::test_components::EnumComplex': 'StructLike(a: 0.03258506581187248, b: 61, c: "sagopiuz")', + 'bevy_example::test_components::EnumTest': 'Squishy', + 'bevy_example::test_components::HashmapTestIntColor': '(inner: {})', + 'bevy_example::test_components::HashmapTestIntString': '(named_animations: {})', + 'bevy_example::test_components::HashmapTestSimple': '(named_animations: {})', + 'bevy_example::test_components::HashmapTestStringColor': '(inner: {})', + 'bevy_example::test_components::HashmapTestStringColorFlat': '({})', + 'bevy_example::test_components::HashmapTestStringFloat': '(named_animations: {})', + 'bevy_example::test_components::NestedTupleStuff': '(0.5714026093482971, 54, (basic: (a: 0.4825616776943207, b: 1, c: ' + '"gopiuzfb"), color: (Rgba(red:0.5206693410873413, ' + 'green:0.3277728259563446, blue:0.24999667704105377, ' + 'alpha:0.952816903591156)), colors_list: ' + '([Rgba(red:0.0445563830435276, green:0.8601610660552979, ' + 'blue:0.6031906008720398, alpha:0.38160598278045654), ' + 'Rgba(red:0.2836182117462158, green:0.6749648451805115, ' + 'blue:0.456831157207489, alpha:0.6858614683151245)]), enable: ' + 'true, enum_inner: Rock, nested: (vec: (Vec3(x:0.1329781413078308, ' + 'y:0.7678378224372864, z:0.9824132323265076))), text: "otmbsahe", ' + 'toggle: (false)))', + 'bevy_example::test_components::NestingTestLevel2': '(basic: (a: 0.5714026093482971, b: 54, c: "psagopiu"), color: ' + '(Rgba(red:0.8106188178062439, green:0.03440357372164726, ' + 'blue:0.49008557200431824, alpha:0.07608934491872787)), ' + 'colors_list: ([Rgba(red:0.0445563830435276, ' + 'green:0.8601610660552979, blue:0.6031906008720398, ' + 'alpha:0.38160598278045654), Rgba(red:0.2836182117462158, ' + 'green:0.6749648451805115, blue:0.456831157207489, ' + 'alpha:0.6858614683151245)]), enable: true, enum_inner: Rock, ' + 'nested: (vec: (Vec3(x:0.1329781413078308, y:0.7678378224372864, ' + 'z:0.9824132323265076))), text: "otmbsahe", toggle: (false))', + 'bevy_example::test_components::NestingTestLevel3': '(vec: (Vec3(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019)))', + 'bevy_example::test_components::TupleTest2': '(0.5714026093482971, 54, "psagopiu")', + 'bevy_example::test_components::TupleTestBool': '(true)', + 'bevy_example::test_components::TupleTestColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842))', + 'bevy_example::test_components::TupleTestF32': '(0.5714026093482971)', + 'bevy_example::test_components::TupleTestStr': '("sbnpsago")', + 'bevy_example::test_components::TupleTestU64': '(73)', + 'bevy_example::test_components::TupleVec': '(["npsagopi"])', + 'bevy_example::test_components::TupleVec2': '(Vec2(x:0.5714026093482971, y:0.42888906598091125))', + 'bevy_example::test_components::TupleVec3': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019))', + 'bevy_example::test_components::TupleVecF32F32': '([(0.42888906598091125, 0.5780913233757019)])', + 'bevy_example::test_components::UnitTest': '()', + 'bevy_example::test_components::VecOfColors': '([Rgba(red:0.42888906598091125, green:0.5780913233757019, ' + 'blue:0.20609822869300842, alpha:0.8133212327957153)])', + 'bevy_example::test_components::VecOfF32s': '([0.42888906598091125])', + 'bevy_example::test_components::VecOfVec3s2': '([(Vec3(x:0.42888906598091125, y:0.5780913233757019, ' + 'z:0.20609822869300842))])', + 'bevy_gltf::GltfExtras': '(value: "sbnpsago")', + 'bevy_gltf_blueprints::animation::AnimationInfos': '(animations: [(frame_end: 0.42888906598091125, ' + 'frame_end_override: 0.5780913233757019, frame_start: ' + '0.20609822869300842, frame_start_override: 0.8133212327957153, ' + 'frames_length: 0.8235888481140137, name: "uzfbqpkc")])', + 'bevy_gltf_blueprints::animation::AnimationMarkers': '({})', + 'bevy_gltf_blueprints::animation::BlueprintAnimations': '(named_animations: "")', + 'bevy_gltf_blueprints::animation::SceneAnimations': '(named_animations: "")', + 'bevy_gltf_blueprints::materials::MaterialInfo': '(name: "sbnpsago", source: "piuzfbqp")', + 'bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList': '({})', + 'bevy_gltf_blueprints::spawn_from_blueprints::SpawnBlueprint': '()', + 'bevy_gltf_components::GltfProcessed': '()', + 'bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader': '(color: Rgba(red:0.5714026093482971, ' + 'green:0.42888906598091125, ' + 'blue:0.5780913233757019, ' + 'alpha:0.20609822869300842), strength: ' + '0.8133212327957153)', + 'bevy_gltf_components::blender_settings::lighting::BlenderLightShadows': '(buffer_bias: 0.5714026093482971, enabled: ' + 'false)', + 'bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 73)', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking': '(offset: ' + 'Vec3(x:0.5714026093482971, ' + 'y:0.42888906598091125, ' + 'z:0.5780913233757019))', + 'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.5714026093482971, ' + 'y:0.42888906598091125, ' + 'z:0.5780913233757019))', + 'bevy_gltf_worlflow_examples_common::game::picking::Pickable': '()', + 'bevy_gltf_worlflow_examples_common::game::player::Player': '()', + 'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider': 'Capsule', + 'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider': 'Ball(0.42888906598091125)', + 'bevy_hierarchy::components::children::Children': '([0])', + 'bevy_hierarchy::components::parent::Parent': '(0)', + 'bevy_pbr::bundle::CascadesVisibleEntities': '()', + 'bevy_pbr::bundle::CubemapVisibleEntities': '()', + 'bevy_pbr::fog::FogSettings': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842), directional_light_color: ' + 'Rgba(red:0.8133212327957153, green:0.8235888481140137, blue:0.6534725427627563, ' + 'alpha:0.16022956371307373), directional_light_exponent: 0.5206693410873413, falloff: ' + 'ExponentialSquared(density: 0.07608934491872787))', + 'bevy_pbr::light::CascadeShadowConfig': '(bounds: [0.42888906598091125], minimum_distance: 0.5780913233757019, ' + 'overlap_proportion: 0.20609822869300842)', + 'bevy_pbr::light::Cascades': '(cascades: "")', + 'bevy_pbr::light::ClusterConfig': 'None', + 'bevy_pbr::light::DirectionalLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842), illuminance: ' + '0.8133212327957153, shadow_depth_bias: 0.8235888481140137, shadow_normal_bias: ' + '0.6534725427627563, shadows_enabled: false)', + 'bevy_pbr::light::NotShadowCaster': '()', + 'bevy_pbr::light::NotShadowReceiver': '()', + 'bevy_pbr::light::PointLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842), intensity: 0.8133212327957153, ' + 'radius: 0.8235888481140137, range: 0.6534725427627563, shadow_depth_bias: ' + '0.16022956371307373, shadow_normal_bias: 0.5206693410873413, shadows_enabled: false)', + 'bevy_pbr::light::ShadowFilteringMethod': 'Jimenez14', + 'bevy_pbr::light::SpotLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842), inner_angle: 0.8133212327957153, ' + 'intensity: 0.8235888481140137, outer_angle: 0.6534725427627563, radius: ' + '0.16022956371307373, range: 0.5206693410873413, shadow_depth_bias: 0.3277728259563446, ' + 'shadow_normal_bias: 0.24999667704105377, shadows_enabled: true)', + 'bevy_pbr::light_probe::LightProbe': '()', + 'bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")', + 'bevy_pbr::wireframe::NoWireframe': '()', + 'bevy_pbr::wireframe::Wireframe': '()', + 'bevy_pbr::wireframe::WireframeColor': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842))', + 'bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties': 'Mass(0.42888906598091125)', + 'bevy_rapier3d::dynamics::rigid_body::Ccd': '(enabled: true)', + 'bevy_rapier3d::dynamics::rigid_body::Damping': '(angular_damping: 0.5714026093482971, linear_damping: ' + '0.42888906598091125)', + 'bevy_rapier3d::dynamics::rigid_body::Dominance': '(groups: 73)', + 'bevy_rapier3d::dynamics::rigid_body::ExternalForce': '(force: Vec3(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019), torque: Vec3(x:0.20609822869300842, ' + 'y:0.8133212327957153, z:0.8235888481140137))', + 'bevy_rapier3d::dynamics::rigid_body::ExternalImpulse': '(impulse: Vec3(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019), torque_impulse: ' + 'Vec3(x:0.20609822869300842, y:0.8133212327957153, ' + 'z:0.8235888481140137))', + 'bevy_rapier3d::dynamics::rigid_body::GravityScale': '(0.5714026093482971)', + 'bevy_rapier3d::dynamics::rigid_body::LockedAxes': '(73)', + 'bevy_rapier3d::dynamics::rigid_body::RigidBody': 'Dynamic', + 'bevy_rapier3d::dynamics::rigid_body::Sleeping': '(angular_threshold: 0.5714026093482971, linear_threshold: ' + '0.42888906598091125, sleeping: true)', + 'bevy_rapier3d::dynamics::rigid_body::Velocity': '(angvel: Vec3(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019), linvel: Vec3(x:0.20609822869300842, ' + 'y:0.8133212327957153, z:0.8235888481140137))', + 'bevy_rapier3d::geometry::collider::CollidingEntities': '("")', + 'bevy_rapier3d::geometry::collider::CollisionGroups': '(filters: (73), memberships: (4))', + 'bevy_rapier3d::geometry::collider::ContactForceEventThreshold': '(0.5714026093482971)', + 'bevy_rapier3d::geometry::collider::Friction': '(coefficient: 0.5714026093482971, combine_rule: "")', + 'bevy_rapier3d::geometry::collider::Group': '(73)', + 'bevy_rapier3d::geometry::collider::Restitution': '(coefficient: 0.5714026093482971, combine_rule: "")', + 'bevy_rapier3d::geometry::collider::Sensor': '()', + 'bevy_rapier3d::geometry::collider::SolverGroups': '(filters: (73), memberships: (4))', + 'bevy_render::camera::camera::Camera': '(clear_color: None, hdr: false, is_active: false, msaa_writeback: false, ' + 'order: 73, viewport: None)', + 'bevy_render::camera::camera::CameraMainTextureUsages': 'None', + 'bevy_render::camera::camera::CameraRenderGraph': 'None', + 'bevy_render::camera::camera::Exposure': 'None', + 'bevy_render::camera::projection::OrthographicProjection': '(area: (max: Vec2(x:0.5714026093482971, ' + 'y:0.42888906598091125), min: Vec2(x:0.5780913233757019, ' + 'y:0.20609822869300842)), far: 0.8133212327957153, near: ' + '0.8235888481140137, scale: 0.6534725427627563, ' + 'scaling_mode: WindowSize(0.03440357372164726), ' + 'viewport_origin: Vec2(x:0.49008557200431824, ' + 'y:0.07608934491872787))', + 'bevy_render::camera::projection::PerspectiveProjection': '(aspect_ratio: 0.5714026093482971, far: ' + '0.42888906598091125, fov: 0.5780913233757019, near: ' + '0.20609822869300842)', + 'bevy_render::camera::projection::Projection': 'Perspective((aspect_ratio: 0.42888906598091125, far: ' + '0.5780913233757019, fov: 0.20609822869300842, near: ' + '0.8133212327957153))', + 'bevy_render::mesh::mesh::skinning::SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [0, 0])', + 'bevy_render::mesh::morph::MeshMorphWeights': '(weights: [0.42888906598091125])', + 'bevy_render::mesh::morph::MorphWeights': '(first_mesh: "", weights: [0.42888906598091125])', + 'bevy_render::primitives::Aabb': '(center: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), ' + 'half_extents: Vec3A(x:0.20609822869300842, y:0.8133212327957153, ' + 'z:0.8235888481140137))', + 'bevy_render::primitives::CascadesFrusta': '()', + 'bevy_render::primitives::CubemapFrusta': '()', + 'bevy_render::primitives::Frustum': '()', + 'bevy_render::view::ColorGrading': '(exposure: 0.5714026093482971, gamma: 0.42888906598091125, post_saturation: ' + '0.5780913233757019, pre_saturation: 0.20609822869300842)', + 'bevy_render::view::visibility::InheritedVisibility': '(true)', + 'bevy_render::view::visibility::NoFrustumCulling': '()', + 'bevy_render::view::visibility::ViewVisibility': '(true)', + 'bevy_render::view::visibility::Visibility': 'Visible', + 'bevy_render::view::visibility::VisibleEntities': '()', + 'bevy_render::view::visibility::render_layers::RenderLayers': '(73)', + 'bevy_sprite::mesh2d::mesh::Mesh2dHandle': '(Strong(""))', + 'bevy_sprite::sprite::ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: ' + '0.42888906598091125, sides_scale_mode: ""))', + 'bevy_sprite::sprite::Sprite': '(anchor: Custom(Vec2(x:0.03258506581187248, y:0.4825616776943207)), color: ' + 'Rgba(red:0.014832446351647377, green:0.46258050203323364, blue:0.4912964105606079, ' + 'alpha:0.27752065658569336), custom_size: "", flip_x: true, flip_y: false, rect: "")', + 'bevy_text::pipeline::TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', + 'bevy_text::text2d::Text2dBounds': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', + 'bevy_text::text::Text': '(justify: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: ' + 'Rgba(red:0.4825616776943207, green:0.014832446351647377, blue:0.46258050203323364, ' + 'alpha:0.4912964105606079), font: Weak(Index(index: "")), font_size: 0.03440357372164726), ' + 'value: "pkchxlbn"), (style: (color: Rgba(red:0.8601610660552979, green:0.6031906008720398, ' + 'blue:0.38160598278045654, alpha:0.2836182117462158), font: Weak(Uuid(uuid: ' + '"73b3b118-7d01-4778-8bcc-4e79055f5d22")), font_size: 0.17467059195041656), value: ' + '"jvleoyho")])', + 'bevy_transform::components::global_transform::GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.5714026093482971, ' + 'y:0.42888906598091125, z:0.5780913233757019), ' + 'y_axis: Vec3A(x:0.20609822869300842, ' + 'y:0.8133212327957153, z:0.8235888481140137), ' + 'z_axis: Vec3A(x:0.6534725427627563, ' + 'y:0.16022956371307373, z:0.5206693410873413)), ' + 'translation: Vec3A(x:0.3277728259563446, ' + 'y:0.24999667704105377, z:0.952816903591156)))', + 'bevy_transform::components::transform::Transform': '(rotation: Quat(x:0.5714026093482971, y:0.42888906598091125, ' + 'z:0.5780913233757019, w:0.20609822869300842), scale: ' + 'Vec3(x:0.8133212327957153, y:0.8235888481140137, ' + 'z:0.6534725427627563), translation: Vec3(x:0.16022956371307373, ' + 'y:0.5206693410873413, z:0.3277728259563446))', + 'bevy_ui::focus::FocusPolicy': 'Block', + 'bevy_ui::focus::Interaction': 'None', + 'bevy_ui::focus::RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: ' + 'Vec2(x:0.5714026093482971, y:0.42888906598091125), min: ' + 'Vec2(x:0.5780913233757019, y:0.20609822869300842)))', + 'bevy_ui::measurement::ContentSize': '()', + 'bevy_ui::ui_node::BackgroundColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842))', + 'bevy_ui::ui_node::BorderColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, ' + 'alpha:0.20609822869300842))', + 'bevy_ui::ui_node::CalculatedClip': '(clip: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: ' + 'Vec2(x:0.5780913233757019, y:0.20609822869300842)))', + 'bevy_ui::ui_node::Node': '(calculated_size: Vec2(x:0.5714026093482971, y:0.42888906598091125), outline_offset: ' + '0.5780913233757019, outline_width: 0.20609822869300842, stack_index: 62, unrounded_size: ' + 'Vec2(x:0.8235888481140137, y:0.6534725427627563))', + 'bevy_ui::ui_node::Outline': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, ' + 'blue:0.5780913233757019, alpha:0.20609822869300842), offset: VMax(0.4912964105606079), ' + 'width: Percent(0.6534725427627563))', + 'bevy_ui::ui_node::Style': '(align_content: SpaceAround, align_items: Default, align_self: Baseline, aspect_ratio: ' + 'Some(0.5780913233757019), border: (bottom: Px(0.46258050203323364), left: ' + 'Vw(0.8235888481140137), right: VMin(0.8106188178062439), top: Auto), bottom: ' + 'Vh(0.49008557200431824), column_gap: Auto, direction: Inherit, display: None, flex_basis: ' + 'Percent(0.0445563830435276), flex_direction: Column, flex_grow: 0.6031906008720398, ' + 'flex_shrink: 0.38160598278045654, flex_wrap: Wrap, grid_auto_columns: "", grid_auto_flow: ' + 'RowDense, grid_auto_rows: "", grid_column: (end: "", span: "", start: ""), grid_row: ' + '(end: "", span: "", start: ""), grid_template_columns: "", grid_template_rows: "", ' + 'height: Vw(0.17467059195041656), justify_content: FlexEnd, justify_items: Stretch, ' + 'justify_self: End, left: Px(0.45692843198776245), margin: (bottom: ' + 'VMax(0.9824132323265076), left: Vw(0.6133268475532532), right: Auto, top: ' + 'Vh(0.004055144265294075)), max_height: Px(0.1949533075094223), max_width: ' + 'Percent(0.5363451838493347), min_height: VMax(0.8981962203979492), min_width: ' + 'Percent(0.666689932346344), overflow: (x: Clip, y: Clip), padding: (bottom: ' + 'Vw(0.06499417871236801), left: Vh(0.32468828558921814), right: Vh(0.15641891956329346), ' + 'top: Px(0.9697836637496948)), position_type: Relative, right: Auto, row_gap: Auto, top: ' + 'Vw(0.3011642396450043), width: Vh(0.6578909158706665))', + 'bevy_ui::ui_node::UiImage': '(flip_x: true, flip_y: false, texture: Weak(Uuid(uuid: ' + '"73b3b118-7d01-4778-8bcc-4e79055f5d22")))', + 'bevy_ui::ui_node::ZIndex': 'Local(54)', + 'bevy_ui::widget::button::Button': '()', + 'bevy_ui::widget::image::UiImageSize': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))', + 'bevy_ui::widget::label::Label': '()', + 'bevy_ui::widget::text::TextFlags': '(needs_new_measure_func: true, needs_recompute: false)', + 'bevy_window::window::PrimaryWindow': '()', + 'bevy_window::window::Window': '(canvas: None, composite_alpha_mode: PostMultiplied, cursor: (grab_mode: Confined, ' + 'hit_test: true, icon: Default, visible: false), decorations: false, enabled_buttons: ' + '(close: true, maximize: false, minimize: true), focused: false, ime_enabled: true, ' + 'ime_position: Vec2(x:0.8106188178062439, y:0.03440357372164726), internal: ' + '(maximize_request: Some(false), minimize_request: None, physical_cursor_position: ' + 'None), mode: SizedFullscreen, name: None, position: Centered(Current), present_mode: ' + 'Immediate, prevent_default_event_handling: false, resizable: false, ' + 'resize_constraints: (max_height: 0.42126399278640747, max_width: 0.8268482089042664, ' + 'min_height: 0.2623211145401001, min_width: 0.17467059195041656), resolution: ' + '(physical_height: 38, physical_width: 84, scale_factor: 0.36258742213249207, ' + 'scale_factor_override: Some(0.7678378224372864)), title: "hotmbsah", transparent: ' + 'false, visible: false, window_level: Normal, window_theme: "")'} \ No newline at end of file diff --git a/tools/blenvy/tests/expected_screenshot.png b/tools/blenvy/tests/expected_screenshot.png new file mode 100644 index 0000000..040ba94 Binary files /dev/null and b/tools/blenvy/tests/expected_screenshot.png differ diff --git a/tools/bevy_components/tests/setup_data.py b/tools/blenvy/tests/setup_data.py similarity index 70% rename from tools/bevy_components/tests/setup_data.py rename to tools/blenvy/tests/setup_data.py index 32c6b30..23030a5 100644 --- a/tools/bevy_components/tests/setup_data.py +++ b/tools/blenvy/tests/setup_data.py @@ -5,9 +5,9 @@ import pytest def setup_data(request): print("\nSetting up resources...") - schemaPath = "../../testing/bevy_example/assets/registry.json" + schema_path = "../../testing/bevy_example/assets/registry.json" - yield {"schema_path": schemaPath} + yield {"schema_path": schema_path} def finalizer(): print("\nPerforming teardown...") @@ -15,10 +15,10 @@ def setup_data(request): type_infos = registry.type_infos object = bpy.context.object - remove_component_operator = bpy.ops.object.remove_bevy_component + remove_component_operator = bpy.ops.blenvy.component_remove - for type_name in type_infos: - definition = type_infos[type_name] + for long_name in type_infos: + definition = type_infos[long_name] component_name = definition["short_name"] if component_name in object: try: diff --git a/tools/blenvy/tests/test_bevy_integration.py b/tools/blenvy/tests/test_bevy_integration.py new file mode 100644 index 0000000..a234a11 --- /dev/null +++ b/tools/blenvy/tests/test_bevy_integration.py @@ -0,0 +1,188 @@ +import bpy +import os +import subprocess +import json +import pytest +import shutil + +import filecmp +from PIL import Image +from pixelmatch.contrib.PIL import pixelmatch + +from blenvy.add_ons.auto_export.common.prepare_and_export import prepare_and_export + +@pytest.fixture +def setup_data(request): + print("\nSetting up resources...") + + root_path = "../../testing/bevy_example" + assets_root_path = os.path.join(root_path, "assets") + blueprints_path = os.path.join(assets_root_path, "blueprints") + levels_path = os.path.join(assets_root_path, "levels") + + models_path = os.path.join(assets_root_path, "models") + materials_path = os.path.join(assets_root_path, "materials") + yield { + "root_path": root_path, + "models_path": models_path, + "blueprints_path": blueprints_path, + "levels_path": levels_path, + "materials_path":materials_path + } + + def finalizer(): + + #other_materials_path = os.path.join("../../testing", "other_materials") + + print("\nPerforming teardown...") + if os.path.exists(blueprints_path): + shutil.rmtree(blueprints_path) + + if os.path.exists(levels_path): + shutil.rmtree(levels_path) + + if os.path.exists(models_path): + shutil.rmtree(models_path) + + if os.path.exists(materials_path): + shutil.rmtree(materials_path) + + diagnostics_file_path = os.path.join(root_path, "bevy_diagnostics.json") + if os.path.exists(diagnostics_file_path): + os.remove(diagnostics_file_path) + + hierarchy_file_path = os.path.join(root_path, "bevy_hierarchy.json") + if os.path.exists(hierarchy_file_path): + os.remove(hierarchy_file_path) + + screenshot_observed_path = os.path.join(root_path, "screenshot.png") + if os.path.exists(screenshot_observed_path): + os.remove(screenshot_observed_path) + + #request.addfinalizer(finalizer) + + return None + + +""" +- calls exporter on the testing scene +- launches bevy app & checks for output +- checks screenshot, hierarchy & diagnostics files generated on the bevy side against reference files +- if all worked => test is a-ok +- removes generated files +""" +def test_export_complex(setup_data): + root_path = setup_data["root_path"] + + # with change detection + # first, configure things + # we use the global settings for that + export_props = { + } + gltf_settings = { + "export_animations": True, + "export_optimize_animation_size": False, + "export_apply":True + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + # and store settings for the gltf part + stored_gltf_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + stored_gltf_settings.clear() + stored_gltf_settings.write(json.dumps(gltf_settings)) + + # move the main cube + bpy.data.objects["Cube"].location = [1, 0, 0] + # move the cube in the library + # TODO: add back bpy.data.objects["Blueprint1_mesh"].location = [1, 2, 1] + + blenvy = bpy.context.window_manager.blenvy + #blenvy.project_root_path = + #blenvy.blueprints_path + blenvy.auto_export.auto_export = True + blenvy.auto_export.export_scene_settings = True + blenvy.auto_export.export_blueprints = True + blenvy.auto_export.export_materials_library = True + + bpy.data.scenes['World'].blenvy_scene_type = 'Level' # set scene as main/level scene + bpy.data.scenes['Library'].blenvy_scene_type = 'Library' # set scene as Library scene + + # scene asset + user_asset = bpy.data.scenes['World'].user_assets.add() + user_asset.name = "test_asset" + user_asset.path = "audio/fake.mp3" + + # blueprint asset + user_asset = bpy.data.collections['Blueprint4_nested'].user_assets.add() + user_asset.name = "yoho_audio" + user_asset.path = "audio/fake.mp3" + + # we have to cheat, since we cannot rely on the data injected when saving the library file (since we are not saving it as part of the tests) + bpy.data.collections["External_blueprint"]["export_path"] = "blueprints/External_blueprint.glb" + bpy.data.collections["External_blueprint2"]["export_path"] = "blueprints/External_blueprint2.glb" + bpy.data.collections["External_blueprint3"]["export_path"] = "blueprints/External_blueprint3.glb" + + bpy.data.collections["External_blueprint"]["materials_path"] = "materials/testing_library_materials.glb" + bpy.data.collections["External_blueprint2"]["materials_path"] = "materials/testing_library_materials.glb" + bpy.data.collections["External_blueprint3"]["materials_path"] = "materials/testing_library_materials.glb" + + # do the actual exporting + prepare_and_export() + + # blueprint1 => has an instance, got changed, should export + # blueprint2 => has NO instance, but marked as asset, should export + # blueprint3 => has NO instance, not marked as asset, used inside blueprint 4: should export + # blueprint4 => has an instance, with nested blueprint3, should export + # blueprint5 => has NO instance, not marked as asset, should NOT export + + assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint1.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint2.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint3.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint4_nested.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint5.glb")) == False + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint6_animated.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint7_hierarchy.glb")) == True + + # 'assets_list_'+scene.name+"_components" should have been removed after the export + assets_list_object_name = "assets_list_"+"World"+"_components" + assets_list_object_present = assets_list_object_name in bpy.data.objects + assert assets_list_object_present == False + + # now run bevy + command = "cargo run --features bevy/dynamic_linking" + FNULL = open(os.devnull, 'w') #use this if you want to suppress output to stdout from the subprocess + return_code = subprocess.call(["cargo", "run", "--features", "bevy/dynamic_linking"], cwd=root_path) + print("RETURN CODE OF BEVY APP", return_code) + assert return_code == 0 + + with open(os.path.join(root_path, "bevy_diagnostics.json")) as diagnostics_file: + diagnostics = json.load(diagnostics_file) + print("diagnostics", diagnostics) + assert diagnostics["animations"] == True + assert diagnostics["empty_found"] == True + assert diagnostics["blueprints_list_found"] == True + assert diagnostics["exported_names_correct"] == True + + with open(os.path.join(root_path, "bevy_hierarchy.json")) as hierarchy_file: + with open(os.path.join(os.path.dirname(__file__), "expected_bevy_hierarchy.json")) as expexted_hierarchy_file: + hierarchy = json.load(hierarchy_file) + expected = json.load(expexted_hierarchy_file) + assert sorted(hierarchy.items()) == sorted(expected.items()) + + # last but not least, do a visual compare + screenshot_expected_path = os.path.join(os.path.dirname(__file__), "expected_screenshot.png") + screenshot_observed_path = os.path.join(root_path, "screenshot.png") + img_a = Image.open(screenshot_expected_path) + img_b = Image.open(screenshot_observed_path) + img_diff = Image.new("RGBA", img_a.size) + mismatch = pixelmatch(img_a, img_b, img_diff, includeAA=True) + print("image mismatch", mismatch) + assert mismatch < 50 + + + diff --git a/tools/blenvy/tests/test_bevy_integration_prepare.py b/tools/blenvy/tests/test_bevy_integration_prepare.py new file mode 100644 index 0000000..3508c24 --- /dev/null +++ b/tools/blenvy/tests/test_bevy_integration_prepare.py @@ -0,0 +1,67 @@ +import os +import json +import pytest +import bpy +from blenvy.add_ons.auto_export.common.prepare_and_export import prepare_and_export + +@pytest.fixture +def setup_data(request): + print("\nSetting up resources...") + + root_path = "../../testing/bevy_example" + assets_root_path = os.path.join(root_path, "assets") + blueprints_path = os.path.join(assets_root_path, "blueprints") + levels_path = os.path.join(assets_root_path, "levels") + + models_path = os.path.join(assets_root_path, "models") + materials_path = os.path.join(assets_root_path, "materials") + yield { + "root_path": root_path, + "models_path": models_path, + "blueprints_path": blueprints_path, + "levels_path": levels_path, + "materials_path":materials_path + } + +# this runs the external blueprints file +def test_export_external_blueprints(setup_data): + root_path = setup_data["root_path"] + + # with change detection + # first, configure things + # we use the global settings for that + export_props = { + } + gltf_settings = { + "export_animations": True, + "export_optimize_animation_size": False + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + # and store settings for the gltf part + stored_gltf_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + stored_gltf_settings.clear() + stored_gltf_settings.write(json.dumps(gltf_settings)) + + blenvy = bpy.context.window_manager.blenvy + #blenvy.project_root_path = + #blenvy.blueprints_path + blenvy.auto_export.auto_export = True + blenvy.auto_export.export_scene_settings = True + blenvy.auto_export.export_blueprints = True + #blenvy.auto_export.export_materials_library = True + + print("SCENES", bpy.data.scenes) + for scene in bpy.data.scenes: + print("SCNE", scene) + bpy.data.scenes['Library'].blenvy_scene_type = 'Library' # set scene as Library scene + # do the actual export + prepare_and_export() + + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "External_blueprint.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "External_blueprint2.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "External_blueprint3.glb")) == True \ No newline at end of file diff --git a/tools/blenvy/tests/test_bevy_integration_simple.py b/tools/blenvy/tests/test_bevy_integration_simple.py new file mode 100644 index 0000000..f3ef057 --- /dev/null +++ b/tools/blenvy/tests/test_bevy_integration_simple.py @@ -0,0 +1,186 @@ +import bpy +import os +import subprocess +import json +import pytest +import shutil + +import filecmp +from PIL import Image +from pixelmatch.contrib.PIL import pixelmatch + +from blenvy.add_ons.auto_export.common.prepare_and_export import prepare_and_export + +@pytest.fixture +def setup_data(request): + print("\nSetting up resources...") + + root_path = "../../testing/bevy_example" + assets_root_path = os.path.join(root_path, "assets") + blueprints_path = os.path.join(assets_root_path, "blueprints") + levels_path = os.path.join(assets_root_path, "levels") + + models_path = os.path.join(assets_root_path, "models") + materials_path = os.path.join(assets_root_path, "materials") + yield { + "root_path": root_path, + "models_path": models_path, + "blueprints_path": blueprints_path, + "levels_path": levels_path, + "materials_path":materials_path + } + + def finalizer(): + + #other_materials_path = os.path.join("../../testing", "other_materials") + + print("\nPerforming teardown...") + if os.path.exists(blueprints_path): + shutil.rmtree(blueprints_path) + + if os.path.exists(levels_path): + shutil.rmtree(levels_path) + + if os.path.exists(models_path): + shutil.rmtree(models_path) + + if os.path.exists(materials_path): + shutil.rmtree(materials_path) + + diagnostics_file_path = os.path.join(root_path, "bevy_diagnostics.json") + if os.path.exists(diagnostics_file_path): + os.remove(diagnostics_file_path) + + hierarchy_file_path = os.path.join(root_path, "bevy_hierarchy.json") + if os.path.exists(hierarchy_file_path): + os.remove(hierarchy_file_path) + + screenshot_observed_path = os.path.join(root_path, "screenshot.png") + if os.path.exists(screenshot_observed_path): + os.remove(screenshot_observed_path) + + #request.addfinalizer(finalizer) + + return None + + +""" +- calls exporter on the testing scene +- launches bevy app & checks for output +- checks screenshot, hierarchy & diagnostics files generated on the bevy side against reference files +- if all worked => test is a-ok +- removes generated files +""" +def test_export_complex(setup_data): + root_path = setup_data["root_path"] + + # with change detection + # first, configure things + # we use the global settings for that + export_props = { + } + gltf_settings = { + "export_format":"GLTF_SEPARATE", + "export_animations": True, + "export_optimize_animation_size": False, + "export_apply":True + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + # and store settings for the gltf part + stored_gltf_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + stored_gltf_settings.clear() + stored_gltf_settings.write(json.dumps(gltf_settings)) + + # move the main cube + # bpy.data.objects["Cube"].location = [1, 0, 0] + # move the cube in the library + # TODO: add back bpy.data.objects["Blueprint1_mesh"].location = [1, 2, 1] + + blenvy = bpy.context.window_manager.blenvy + #blenvy.project_root_path = + #blenvy.blueprints_path + blenvy.auto_export.auto_export = True + blenvy.auto_export.export_scene_settings = True + blenvy.auto_export.export_blueprints = True + blenvy.auto_export.export_materials_library = True + + bpy.data.scenes['World'].blenvy_scene_type = 'Level' # set scene as main/level scene + bpy.data.scenes['Library'].blenvy_scene_type = 'Library' # set scene as Library scene + + # scene asset + user_asset = bpy.data.scenes['World'].user_assets.add() + '''user_asset.name = "test_asset" + user_asset.path = "audio/fake.mp3"''' + + # blueprint asset + #user_asset = bpy.data.collections['Blueprint4_nested'].user_assets.add() + '''user_asset.name = "yoho_audio" + user_asset.path = "audio/fake.mp3"''' + + # we have to cheat, since we cannot rely on the data injected when saving the library file (since we are not saving it as part of the tests) + bpy.data.collections["External_blueprint"]["export_path"] = "blueprints/External_blueprint.glb" + bpy.data.collections["External_blueprint2"]["export_path"] = "blueprints/External_blueprint2.glb" + bpy.data.collections["External_blueprint3"]["export_path"] = "blueprints/External_blueprint3.glb" + #materials/testing_library_materials.glb + + # do the actual exporting + prepare_and_export() + + # blueprint1 => has an instance, got changed, should export + # blueprint2 => has NO instance, but marked as asset, should export + # blueprint3 => has NO instance, not marked as asset, used inside blueprint 4: should export + # blueprint4 => has an instance, with nested blueprint3, should export + # blueprint5 => has NO instance, not marked as asset, should NOT export + + '''assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint1.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint2.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint3.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint4_nested.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint5.glb")) == False + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint6_animated.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint7_hierarchy.glb")) == True''' + + # 'assets_list_'+scene.name+"_components" should have been removed after the export + assets_list_object_name = "assets_list_"+"World"+"_components" + assets_list_object_present = assets_list_object_name in bpy.data.objects + assert assets_list_object_present == False + + # now run bevy + command = "cargo run --features bevy/dynamic_linking" + FNULL = open(os.devnull, 'w') #use this if you want to suppress output to stdout from the subprocess + return_code = subprocess.call(["cargo", "run", "--features", "bevy/dynamic_linking"], cwd=root_path) + print("RETURN CODE OF BEVY APP", return_code) + assert return_code == 0 + + with open(os.path.join(root_path, "bevy_diagnostics.json")) as diagnostics_file: + diagnostics = json.load(diagnostics_file) + print("diagnostics", diagnostics) + assert diagnostics["animations"] == True + assert diagnostics["empty_found"] == True + assert diagnostics["blueprints_list_found"] == True + assert diagnostics["exported_names_correct"] == True + + with open(os.path.join(root_path, "bevy_hierarchy.json")) as hierarchy_file: + with open(os.path.join(os.path.dirname(__file__), "expected_bevy_hierarchy.json")) as expexted_hierarchy_file: + hierarchy = json.load(hierarchy_file) + expected = json.load(expexted_hierarchy_file) + assert sorted(hierarchy.items()) == sorted(expected.items()) + + # last but not least, do a visual compare + screenshot_expected_path = os.path.join(os.path.dirname(__file__), "expected_screenshot.png") + screenshot_observed_path = os.path.join(root_path, "screenshot.png") + img_a = Image.open(screenshot_expected_path) + img_b = Image.open(screenshot_observed_path) + img_diff = Image.new("RGBA", img_a.size) + mismatch = pixelmatch(img_a, img_b, img_diff, includeAA=True) + print("image mismatch", mismatch) + assert mismatch < 50 + + + diff --git a/tools/blenvy/tests/test_change_tracking.py b/tools/blenvy/tests/test_change_tracking.py new file mode 100644 index 0000000..772582b --- /dev/null +++ b/tools/blenvy/tests/test_change_tracking.py @@ -0,0 +1,270 @@ +import bpy +import os +import json +import pytest +import shutil +import pathlib +import mathutils + +from .test_helpers import prepare_auto_export, run_auto_export_and_compare + +@pytest.fixture +def setup_data(request): + print("\nSetting up resources...") + #other_materials_path = os.path.join("../../testing", "other_materials") + root_path = "../../testing/bevy_example" + assets_root_path = os.path.join(root_path, "assets") + blueprints_path = os.path.join(assets_root_path, "blueprints") + levels_path = os.path.join(assets_root_path, "levels") + + models_path = os.path.join(assets_root_path, "models") + materials_path = os.path.join(assets_root_path, "materials") + + yield { + "root_path": root_path, + "models_path": models_path, + "blueprints_path": blueprints_path, + "levels_path": levels_path, + "materials_path":materials_path + } + + def finalizer(): + print("\nPerforming teardown...") + if os.path.exists(blueprints_path): + shutil.rmtree(blueprints_path) + + if os.path.exists(levels_path): + shutil.rmtree(levels_path) + + if os.path.exists(models_path): + shutil.rmtree(models_path) + + if os.path.exists(materials_path): + shutil.rmtree(materials_path) + + diagnostics_file_path = os.path.join(root_path, "bevy_diagnostics.json") + if os.path.exists(diagnostics_file_path): + os.remove(diagnostics_file_path) + + hierarchy_file_path = os.path.join(root_path, "bevy_hierarchy.json") + if os.path.exists(hierarchy_file_path): + os.remove(hierarchy_file_path) + + screenshot_observed_path = os.path.join(root_path, "screenshot.png") + if os.path.exists(screenshot_observed_path): + os.remove(screenshot_observed_path) + + request.addfinalizer(finalizer) + + return None + +def test_export_change_tracking_custom_properties(setup_data): + # set things up + prepare_auto_export() + + def first_change(): + # now add a custom property to the cube in the level scene & export again + print("----------------") + print("level scene change (custom property)") + print("----------------") + bpy.data.objects["Cube"]["test_property"] = 42 + + run_auto_export_and_compare( + setup_data=setup_data, + changes=[first_change], + expected_changed_files = [["World"]] # only the "world" file should have changed + ) + +def test_export_change_tracking_custom_properties_collection_instances_combine_mode_embed(setup_data): + # set things up + prepare_auto_export({"collection_instances_combine_mode": "Embed"}) + + def first_change(): + # we have no change, but we also have no blueprints exported, because of the embed mode + blueprint1_file_path = os.path.join(setup_data["blueprints_path"], "Blueprint1.glb") + assert os.path.exists(blueprint1_file_path) == False + + def second_change(): + # add a custom property to the cube in the library scene & export again + # this should trigger changes in the level scene as well since the mode is embed & this blueprints has an instance in the level scene + print("----------------") + print("library change (custom property)") + print("----------------") + bpy.data.objects["Blueprint1_mesh"]["test_property"] = 42 + + def third_change(): + # now we set the _combine mode of the instance to "split", so auto_export should: + # * not take the changes into account in the level scene + # * export the blueprint (so file for Blueprint1 will be changed) + bpy.data.objects["Blueprint1"]["_combine"] = "Split" + + def fourth_change(): + print("----------------") + print("library change (custom property, forced 'Split' combine mode )") + print("----------------") + + bpy.data.objects["Blueprint1_mesh"]["test_property"] = 151 + + run_auto_export_and_compare( + setup_data=setup_data, + changes=[first_change, second_change, third_change, fourth_change], + expected_changed_files = [[], ["World"], ["World","Blueprint1"], ["World"]] # only the "world" file should have changed + ) + + +def test_export_change_tracking_light_properties(setup_data): + # set things up + prepare_auto_export() + + def first_change(): + # now add a custom property to the cube in the level scene & export again + print("----------------") + print("level scene change (light, energy)") + print("----------------") + + bpy.data.lights["Light"].energy = 100 + #world_file_path = os.path.join(setup_data["levels_path"], "World.glb") + #assert os.path.exists(world_file_path) == True + + def second_change(): + print("----------------") + print("level scene change (light, shadow_cascade_count)") + print("----------------") + + bpy.data.lights["Light"].shadow_cascade_count = 2 + + def third_change(): + print("----------------") + print("level scene change (light, use_shadow)") + print("----------------") + + bpy.data.lights["Light"].use_shadow = False + + run_auto_export_and_compare( + setup_data=setup_data, + changes=[first_change, second_change, third_change], + expected_changed_files = [["World"], ["World"], ["World"]] # only the "world" file should have changed + ) + + +def test_export_change_tracking_camera_properties(setup_data): + # set things up + prepare_auto_export() + + def first_change(): + print("----------------") + print("level scene change (camera)") + print("----------------") + + bpy.data.cameras["Camera"].angle = 0.5 + + run_auto_export_and_compare( + setup_data=setup_data, + changes=[first_change], + expected_changed_files = [["World"]] # only the "world" file should have changed + ) + +def test_export_change_tracking_material_properties(setup_data): + # set things up + prepare_auto_export() + + def first_change(): + print("----------------") + print("level scene change (material, clip)") + print("----------------") + + bpy.data.materials["Material.001"].blend_method = 'CLIP' + + def second_change(): + print("----------------") + print("level scene change (material, alpha_threshold)") + print("----------------") + bpy.data.materials["Material.001"].alpha_threshold = 0.2 + + def third_change(): + print("----------------") + print("level scene change (material, diffuse_color)") + print("----------------") + bpy.data.materials["Material.001"].diffuse_color[0] = 0.2 + + run_auto_export_and_compare( + setup_data=setup_data, + changes=[first_change, second_change, third_change], + expected_changed_files = [["Blueprint1", "Blueprint7_hierarchy"], ["Blueprint1", "Blueprint7_hierarchy"], ["Blueprint1", "Blueprint7_hierarchy"]] + # the material is assigned to Blueprint 1 so in normal (split mode) only the "Blueprint1" file should have changed + # the same material is assigned to Blueprint 7 so in normal (split mode) only the "Blueprint1" file should have changed + ) + + +""" +- setup gltf parameters & auto_export parameters +- calls exporter on the testing scene +- saves timestamps of generated files +- changes things in the level scene and/or library +- checks if timestamps have changed +- if all worked => test is a-ok +- removes generated files + +""" +def test_export_various_chained_changes(setup_data): + + def first_change(): + # export again with no changes + print("----------------") + print("no changes") + print("----------------") + world_file_path = os.path.join(setup_data["levels_path"], "World.glb") + assert os.path.exists(world_file_path) == True + + def second_change(): + # now move the main cube & export again + print("----------------") + print("level scene change") + print("----------------") + + bpy.context.window_manager.auto_export_tracker.enable_change_detection() # FIXME: should not be needed, but .. + bpy.data.objects["Cube"].location = [1, 0, 0] + + def third_change(): + # now same, but move the cube in the library + print("----------------") + print("library change (blueprint) ") + print("----------------") + bpy.context.window_manager.auto_export_tracker.enable_change_detection() # FIXME: should not be needed, but .. + + bpy.data.objects["Blueprint1_mesh"].location = [1, 2, 1] + + def fourth_change(): + # now change something in a nested blueprint + print("----------------") + print("library change (nested blueprint) ") + print("----------------") + + bpy.data.objects["Blueprint3_mesh"].location= [0, 0.1 ,2] + + def fifth_change(): + # now same, but using an operator + print("----------------") + print("change using operator") + print("----------------") + + with bpy.context.temp_override(active_object=bpy.data.objects["Cube"], selected_objects=[bpy.data.objects["Cube"]], scene=bpy.data.scenes["World"]): + print("translate using operator") + bpy.ops.transform.translate(value=mathutils.Vector((2.0, 1.0, -5.0))) + bpy.ops.transform.rotate(value=0.378874, constraint_axis=(False, False, True), mirror=False, proportional_edit_falloff='SMOOTH', proportional_size=1) + bpy.ops.object.transform_apply() + bpy.ops.transform.translate(value=(3.5, 0, 0), constraint_axis=(True, False, False)) + + run_auto_export_and_compare( + setup_data=setup_data, + changes=[first_change, second_change, third_change, fourth_change, fifth_change], + expected_changed_files = [ + [], + ["World"], # only the "world" file should have changed + ["Blueprint1"],# The blueprint1 file should have changed, since that is the collection we changed, not the world, since we are in "split mode by default" + ["Blueprint3"],# The blueprint3 file should have changed, since that is the collection we changed # the blueprint4 file NOT, since, while it contains an instance of the collection we changed, the default export mode is "split" + ["World"] + ] + ) + + #bpy.context.window_manager.auto_export_tracker.enable_change_detection() # FIXME: should not be needed, but .. diff --git a/tools/blenvy/tests/test_changed_parameters.py b/tools/blenvy/tests/test_changed_parameters.py new file mode 100644 index 0000000..e85b432 --- /dev/null +++ b/tools/blenvy/tests/test_changed_parameters.py @@ -0,0 +1,257 @@ +import bpy +import os +import json +import pytest +import shutil + +from .test_helpers import prepare_auto_export + +@pytest.fixture +def setup_data(request): + print("\nSetting up resources...") + root_path = "../../testing/bevy_example" + assets_root_path = os.path.join(root_path, "assets") + blueprints_path = os.path.join(assets_root_path, "blueprints") + levels_path = os.path.join(assets_root_path, "levels") + + models_path = os.path.join(assets_root_path, "models") + materials_path = os.path.join(assets_root_path, "materials") + + #other_materials_path = os.path.join("../../testing", "other_materials") + yield { + "root_path": root_path, + "models_path": models_path, + "blueprints_path": blueprints_path, + "levels_path": levels_path, + "materials_path":materials_path + } + + def finalizer(): + + + print("\nPerforming teardown...") + if os.path.exists(blueprints_path): + shutil.rmtree(blueprints_path) + + if os.path.exists(levels_path): + shutil.rmtree(levels_path) + + if os.path.exists(models_path): + shutil.rmtree(models_path) + + if os.path.exists(materials_path): + shutil.rmtree(materials_path) + + diagnostics_file_path = os.path.join(root_path, "bevy_diagnostics.json") + if os.path.exists(diagnostics_file_path): + os.remove(diagnostics_file_path) + + hierarchy_file_path = os.path.join(root_path, "bevy_hierarchy.json") + if os.path.exists(hierarchy_file_path): + os.remove(hierarchy_file_path) + + screenshot_observed_path = os.path.join(root_path, "screenshot.png") + if os.path.exists(screenshot_observed_path): + os.remove(screenshot_observed_path) + + request.addfinalizer(finalizer) + + return None + + +""" +- setup gltf parameters & auto_export parameters +- calls exporter on the testing scene +- saves timestamps of generated files +- changes exporter parameters +- checks if timestamps have changed +- if all worked => test is a-ok +- removes generated files +""" + +def test_export_no_parameters(setup_data): + auto_export_operator = bpy.ops.export_scenes.auto_gltf + + # make sure to clear any parameters first + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps({})) + + # first test exporting without any parameters set, this should not export anything + auto_export_operator( + auto_export=True, + direct_mode=True, + export_materials_library=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + ) + + world_file_path = os.path.join(setup_data["levels_path"], "World.glb") + assert os.path.exists(world_file_path) != True + +def test_export_auto_export_parameters_only(setup_data): + auto_export_operator = bpy.ops.export_scenes.auto_gltf + export_props = { + "level_scene_names" : ['World'], + "library_scene_names": ['Library'], + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_materials_library=True + ) + + world_file_path = os.path.join(setup_data["levels_path"], "World.glb") + assert os.path.exists(world_file_path) == True + +def test_export_changed_parameters(setup_data): + auto_export_operator = bpy.ops.export_scenes.auto_gltf + + # with change detection + # first, configure things + # we use the global settings for that + export_props = { + "level_scene_names" : ['World'], + "library_scene_names": ['Library'], + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + gltf_settings = { + "export_animations": True, + "export_optimize_animation_size": False + } + # and store settings for the gltf part + stored_gltf_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + stored_gltf_settings.clear() + stored_gltf_settings.write(json.dumps(gltf_settings)) + + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=True + ) + + world_file_path = os.path.join(setup_data["levels_path"], "World.glb") + assert os.path.exists(world_file_path) == True + + blueprints_path = setup_data["blueprints_path"] + model_library_file_paths = list(map(lambda file_name: os.path.join(blueprints_path, file_name), sorted(os.listdir(blueprints_path)))) + modification_times_first = list(map(lambda file_path: os.path.getmtime(file_path), model_library_file_paths)) + + # export again, with no param changes: this should NOT export anything again, ie, modification times should be the same + print("second export") + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=True + ) + + modification_times_no_change = list(map(lambda file_path: os.path.getmtime(file_path), model_library_file_paths)) + assert modification_times_no_change == modification_times_first + + # export again, this time changing the gltf settings + print("third export, changed gltf parameters") + + gltf_settings = { + "export_animations": True, + "export_optimize_animation_size": True + } + + stored_gltf_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + stored_gltf_settings.clear() + stored_gltf_settings.write(json.dumps(gltf_settings)) + + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=True + ) + + modification_times_changed_gltf = list(map(lambda file_path: os.path.getmtime(file_path), model_library_file_paths)) + assert modification_times_changed_gltf != modification_times_first + modification_times_first = modification_times_changed_gltf + + # now run it again, without changes, timestamps should be identical + + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=True + ) + + modification_times_changed_gltf = list(map(lambda file_path: os.path.getmtime(file_path), model_library_file_paths)) + assert modification_times_changed_gltf == modification_times_first + modification_times_first = modification_times_changed_gltf + + + # export again, this time changing the auto_export settings + print("fourth export, changed auto parameters") + + export_props = { + "level_scene_names" : ['World'], + "library_scene_names": ['Library'], + "export_materials_library": False # we need to add it here, as the direct settings set on the operator will only be used for the NEXT run + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=False + ) + + modification_times_changed_auto = list(map(lambda file_path: os.path.getmtime(file_path), model_library_file_paths)) + assert modification_times_changed_auto != modification_times_first + modification_times_first = modification_times_changed_auto + + # now run it again, withouth changes, timestamps should be identical + + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=False + ) + + modification_times_changed_gltf = list(map(lambda file_path: os.path.getmtime(file_path), model_library_file_paths)) + assert modification_times_changed_gltf == modification_times_first + modification_times_first = modification_times_changed_gltf diff --git a/tools/bevy_components/tests/test_components.py b/tools/blenvy/tests/test_components.py similarity index 59% rename from tools/bevy_components/tests/test_components.py rename to tools/blenvy/tests/test_components.py index 42e5656..5f87636 100644 --- a/tools/bevy_components/tests/test_components.py +++ b/tools/blenvy/tests/test_components.py @@ -1,16 +1,17 @@ import bpy import pprint -from ..propGroups.conversions_to_prop_group import property_group_value_from_custom_property_value -from ..propGroups.conversions_from_prop_group import property_group_value_to_custom_property_value +from ..bevy_components.propGroups.conversions_to_prop_group import property_group_value_from_custom_property_value +from ..bevy_components.propGroups.conversions_from_prop_group import property_group_value_to_custom_property_value from .component_values_shuffler import component_values_shuffler from .expected_component_values import (expected_custom_property_values, expected_custom_property_values_randomized) +from ..bevy_components.components.metadata import get_bevy_component_value_by_long_name, get_bevy_components, upsert_bevy_component from .setup_data import setup_data def test_components_should_generate_correct_custom_properties(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() type_infos = registry.type_infos @@ -23,27 +24,26 @@ def test_components_should_generate_correct_custom_properties(setup_data): custom_property_values = {} - for type_name in type_infos: - definition = type_infos[type_name] - component_type = definition["title"] - short_name = definition["short_name"] + for long_name in type_infos: + definition = type_infos[long_name] + long_name = definition["long_name"] is_component = definition['isComponent'] if "isComponent" in definition else False if not is_component: continue - addable_components.append(component_type) + addable_components.append(long_name) try: - add_component_operator(component_type=component_type) + add_component_operator(component_type=long_name) - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + property_group_name = registry.get_propertyGroupName_from_longName(long_name) target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) propertyGroup = getattr(component_meta, property_group_name, None) - added_components.append(component_type) - custom_property_values[short_name] = object[short_name] - assert object[short_name] == expected_custom_property_values[short_name] + added_components.append(long_name) + custom_property_values[long_name] = get_bevy_component_value_by_long_name(object, long_name) + assert get_bevy_component_value_by_long_name(object, long_name) == expected_custom_property_values[long_name] except Exception as error: errors.append(error) @@ -53,12 +53,12 @@ def test_components_should_generate_correct_custom_properties(setup_data): pp.pprint(custom_property_values) assert len(errors) == 0 - assert len(added_components) == 159 + assert len(added_components) == 173 def test_components_should_generate_correct_custom_properties_with_randomized_values(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() type_infos = registry.type_infos @@ -72,32 +72,31 @@ def test_components_should_generate_correct_custom_properties_with_randomized_va custom_property_values = {} - for type_name in type_infos: - definition = type_infos[type_name] - component_type = definition["title"] - short_name = definition["short_name"] + for long_name in type_infos: + definition = type_infos[long_name] + long_name = definition["long_name"] is_component = definition['isComponent'] if "isComponent" in definition else False if not is_component: continue - addable_components.append(component_type) + addable_components.append(long_name) try: - add_component_operator(component_type=component_type) - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + add_component_operator(component_type=long_name) + property_group_name = registry.get_propertyGroupName_from_longName(long_name) target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) propertyGroup = getattr(component_meta, property_group_name, None) component_values_shuffler(seed= 10, property_group=propertyGroup, definition=definition, registry=registry) - added_components.append(component_type) - custom_property_values[short_name] = object[short_name] - assert object[short_name] == expected_custom_property_values_randomized[short_name] + added_components.append(long_name) + custom_property_values[long_name] = get_bevy_component_value_by_long_name(object, long_name) + assert get_bevy_component_value_by_long_name(object, long_name) == expected_custom_property_values_randomized[long_name] except Exception as error: errors.append(error) - error_components.append(short_name) + error_components.append(long_name) pp = pprint.PrettyPrinter(depth=14, width=120) print("CUSTOM PROPERTY VALUES") @@ -105,11 +104,11 @@ def test_components_should_generate_correct_custom_properties_with_randomized_va print("error_components", error_components) assert len(errors) == 0 - assert len(added_components) == 159 + assert len(added_components) == 173 def test_components_should_generate_correct_propertyGroup_values_from_custom_properties(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() type_infos = registry.type_infos @@ -121,54 +120,53 @@ def test_components_should_generate_correct_propertyGroup_values_from_custom_pro added_components = [] failing_components = [] - for type_name in type_infos: - definition = type_infos[type_name] - component_type = definition["title"] - short_name = definition["short_name"] + for long_name in type_infos: + definition = type_infos[long_name] + long_name = definition["long_name"] is_component = definition['isComponent'] if "isComponent" in definition else False if not is_component: continue - addable_components.append(component_type) + addable_components.append(long_name) try: - add_component_operator(component_type=component_type) - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + add_component_operator(component_type=long_name) + property_group_name = registry.get_propertyGroupName_from_longName(long_name) target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) propertyGroup = getattr(component_meta, property_group_name, None) - added_components.append(component_type) + added_components.append(long_name) # randomise values component_values_shuffler(seed= 10, property_group=propertyGroup, definition=definition, registry=registry) - custom_property_value = object[short_name] + custom_property_value = get_bevy_component_value_by_long_name(object, long_name) # first check if custom property value matches what we expect - assert custom_property_value == expected_custom_property_values_randomized[short_name] + assert custom_property_value == expected_custom_property_values_randomized[long_name] # we update propgroup values from custom property values property_group_value_from_custom_property_value(propertyGroup, definition, registry, custom_property_value, nesting = []) # and then generate it back custom_property_value_regen = property_group_value_to_custom_property_value(propertyGroup, definition, registry, None) - assert custom_property_value_regen == expected_custom_property_values_randomized[short_name] + assert custom_property_value_regen == expected_custom_property_values_randomized[long_name] - # custom_property_values[short_name] = object[short_name] - #assert object[short_name] == expected_custom_property_values[short_name] - #print("CUSTOM PROPERTY ", object[short_name]) + # custom_property_values[long_name] = object[long_name] + #assert object[long_name] == expected_custom_property_values[long_name] + #print("CUSTOM PROPERTY ", object[long_name]) except Exception as error: errors.append(error) - failing_components.append(short_name) + failing_components.append(long_name) for index, error in enumerate(errors): print("ERROR", error, failing_components[index]) assert len(errors) == 0 - assert len(added_components) == 159 + assert len(added_components) == 173 def test_remove_components(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() type_infos = registry.type_infos @@ -178,38 +176,30 @@ def test_remove_components(setup_data): addable_components = [] added_components = [] - for type_name in type_infos: - definition = type_infos[type_name] - component_type = definition["title"] - short_name = definition["short_name"] + for long_name in type_infos: + definition = type_infos[long_name] + long_name = definition["long_name"] is_component = definition['isComponent'] if "isComponent" in definition else False if not is_component: continue - addable_components.append(component_type) + addable_components.append(long_name) try: - add_component_operator(component_type=component_type) - - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + add_component_operator(component_type=long_name) object = bpy.context.object - - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) - propertyGroup = getattr(component_meta, property_group_name, None) # print("propertyGroup", propertyGroup, propertyGroup.field_names) - added_components.append(component_type) + added_components.append(long_name) except Exception as error: errors.append(error) assert len(errors) == 0 # now test component removal errors.clear() - remove_component_operator = bpy.ops.object.remove_bevy_component - for component_type in added_components: - component_name = type_infos[component_type]["short_name"] + remove_component_operator = bpy.ops.blenvy.component_remove + for long_name in added_components: try: - remove_component_operator(component_name=component_name) + remove_component_operator(component_name=long_name) except Exception as error: errors.append(error) assert len(errors) == 0 @@ -217,27 +207,26 @@ def test_remove_components(setup_data): def test_copy_paste_components(setup_data): context = bpy.context registry = context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - short_name = "BasicTest" - component_type = registry.short_names_to_long_names[short_name] + long_name = "bevy_example::test_components::BasicTest" # SOURCE object setup add_component_operator = bpy.ops.object.add_bevy_component - add_component_operator(component_type=component_type) + add_component_operator(component_type=long_name) - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + property_group_name = registry.get_propertyGroupName_from_longName(long_name) object = context.object target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) propertyGroup = getattr(component_meta, property_group_name, None) setattr(propertyGroup, propertyGroup.field_names[0], 25.0) - copy_component_operator = bpy.ops.object.copy_bevy_component - copy_component_operator(source_component_name=short_name, source_object_name=object.name) + copy_component_operator = bpy.ops.blenvy.component_copy + copy_component_operator(source_component_name=long_name, source_item_name=object.name) # --------------------------------------- # TARGET object @@ -246,19 +235,19 @@ def test_copy_paste_components(setup_data): # change name new_cube.name = "TargetCube" target_components_metadata = new_cube.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) # first check that there is no component currently assert component_meta == None - paste_component_operator = bpy.ops.object.paste_bevy_component + paste_component_operator = bpy.ops.blenvy.component_paste paste_component_operator() target_components_metadata = new_cube.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) # now after pasting to the new object, it should have component meta - assert component_meta != None + assert component_meta is not None # and then check if the propertyGroup of the target object is correct propertyGroup = getattr(component_meta, property_group_name, None) diff --git a/tools/bevy_components/tests/test_conversions.py b/tools/blenvy/tests/test_conversions.py similarity index 97% rename from tools/bevy_components/tests/test_conversions.py rename to tools/blenvy/tests/test_conversions.py index 4125ce0..a145b7c 100644 --- a/tools/bevy_components/tests/test_conversions.py +++ b/tools/blenvy/tests/test_conversions.py @@ -1,4 +1,4 @@ -from ..propGroups.conversions_to_prop_group import parse_struct_string, parse_tuplestruct_string +from ..bevy_components.propGroups.conversions_to_prop_group import parse_struct_string, parse_tuplestruct_string def test_parse_tuplestruct_string(): diff --git a/tools/gltf_auto_export/tests/test_basic.py b/tools/blenvy/tests/test_export_parameters.py similarity index 59% rename from tools/gltf_auto_export/tests/test_basic.py rename to tools/blenvy/tests/test_export_parameters.py index 7d01954..50c1f4c 100644 --- a/tools/gltf_auto_export/tests/test_basic.py +++ b/tools/blenvy/tests/test_export_parameters.py @@ -11,15 +11,33 @@ def setup_data(request): print("\nSetting up resources...") root_path = "../../testing/bevy_example" assets_root_path = os.path.join(root_path, "assets") + blueprints_path = os.path.join(assets_root_path, "blueprints") + levels_path = os.path.join(assets_root_path, "levels") models_path = os.path.join(assets_root_path, "models") materials_path = os.path.join(assets_root_path, "materials") + other_materials_path = os.path.join(assets_root_path, "other_materials") - yield {"root_path": root_path, "assets_root_path": assets_root_path, "models_path": models_path, "materials_path": materials_path, "other_materials_path": other_materials_path} + other_blueprints_path = os.path.join(assets_root_path, "other_blueprints") + + yield { + "root_path": root_path, + "models_path": models_path, + "blueprints_path": blueprints_path, + "levels_path": levels_path, + "materials_path":materials_path, + "other_materials_path":other_materials_path, + "other_blueprints_path":other_blueprints_path + } def finalizer(): print("\nPerforming teardown...") - get_orphan_data() + + if os.path.exists(blueprints_path): + shutil.rmtree(blueprints_path) + + if os.path.exists(levels_path): + shutil.rmtree(levels_path) if os.path.exists(models_path): shutil.rmtree(models_path) @@ -29,6 +47,9 @@ def setup_data(request): if os.path.exists(other_materials_path): shutil.rmtree(other_materials_path) + + if os.path.exists(other_blueprints_path): + shutil.rmtree(other_blueprints_path) request.addfinalizer(finalizer) @@ -38,7 +59,10 @@ def setup_data(request): def get_orphan_data(): orphan_meshes = [m.name for m in bpy.data.meshes if m.users == 0] - # print("orphan meshes before", orphan_meshes) + orphan_objects = [m.name for m in bpy.data.objects if m.users == 0] + + #print("orphan meshes before", orphan_meshes) + return orphan_meshes + orphan_objects def test_export_do_not_export_blueprints(setup_data): auto_export_operator = bpy.ops.export_scenes.auto_gltf @@ -46,43 +70,52 @@ def test_export_do_not_export_blueprints(setup_data): # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } - stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") - stored_settings.clear() - stored_settings.write(json.dumps(export_props)) + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) auto_export_operator( + auto_export=True, direct_mode=True, - export_output_folder="./models", + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="assets/models", export_scene_settings=True, export_blueprints=False, ) assert os.path.exists(os.path.join(setup_data["models_path"], "World.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint1.glb")) == False + assert os.path.exists(os.path.join(setup_data["blueprints_path"],"Blueprint1.glb")) == False + orphan_data = get_orphan_data() + assert len(orphan_data) == 0 + def test_export_custom_blueprints_path(setup_data): auto_export_operator = bpy.ops.export_scenes.auto_gltf # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } - stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") - stored_settings.clear() - stored_settings.write(json.dumps(export_props)) + + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_scene_settings=True, export_blueprints=True, - export_blueprints_path = "another_library_path" + blueprints_path = "assets/other_blueprints" ) - assert os.path.exists(os.path.join(setup_data["models_path"], "World.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "another_library_path", "Blueprint1.glb")) == True + assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["root_path"],"assets", "other_blueprints", "Blueprint1.glb")) == True + assert len(get_orphan_data()) == 0 def test_export_materials_library(setup_data): auto_export_operator = bpy.ops.export_scenes.auto_gltf @@ -90,7 +123,7 @@ def test_export_materials_library(setup_data): # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") @@ -98,16 +131,18 @@ def test_export_materials_library(setup_data): stored_settings.write(json.dumps(export_props)) auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_scene_settings=True, export_blueprints=True, export_materials_library = True ) - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint1.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint1.glb")) == True assert os.path.exists(os.path.join(setup_data["materials_path"], "testing_materials_library.glb")) == True - + assert len(get_orphan_data()) == 0 def test_export_materials_library_custom_path(setup_data): auto_export_operator = bpy.ops.export_scenes.auto_gltf @@ -115,7 +150,7 @@ def test_export_materials_library_custom_path(setup_data): # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") @@ -123,25 +158,28 @@ def test_export_materials_library_custom_path(setup_data): stored_settings.write(json.dumps(export_props)) auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_scene_settings=True, export_blueprints=True, export_materials_library = True, - export_materials_path="other_materials" + materials_path="assets/other_materials" ) - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint1.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint1.glb")) == True assert os.path.exists(os.path.join(setup_data["materials_path"], "testing_materials_library.glb")) == False assert os.path.exists(os.path.join(setup_data["other_materials_path"], "testing_materials_library.glb")) == True + assert len(get_orphan_data()) == 0 -def test_export_collection_instances_combine_mode(setup_data): # TODO: change & check this +def test_export_collection_instances_combine_mode(setup_data): # There is more in depth testing of this in the "change_tracking" tests auto_export_operator = bpy.ops.export_scenes.auto_gltf # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") @@ -152,14 +190,17 @@ def test_export_collection_instances_combine_mode(setup_data): # TODO: change & bpy.data.objects["Cube"]["dynamic"] = True auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_blueprints=True, collection_instances_combine_mode = 'Embed' ) - assert os.path.exists(os.path.join(setup_data["models_path"], "World.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "World_dynamic.glb")) == False + assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["levels_path"], "World_dynamic.glb")) == False + assert len(get_orphan_data()) == 0 def test_export_do_not_export_marked_assets(setup_data): @@ -168,7 +209,7 @@ def test_export_do_not_export_marked_assets(setup_data): # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") @@ -176,18 +217,20 @@ def test_export_do_not_export_marked_assets(setup_data): stored_settings.write(json.dumps(export_props)) auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_scene_settings=True, export_blueprints=True, - export_marked_assets = False ) - assert os.path.exists(os.path.join(setup_data["models_path"], "World.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint1.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint2.glb")) == False - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint3.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint4_nested.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint5.glb")) == False + assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"], "Blueprint1.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"],"Blueprint2.glb")) == False + assert os.path.exists(os.path.join(setup_data["blueprints_path"],"Blueprint3.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"],"Blueprint4_nested.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"],"Blueprint5.glb")) == False + assert len(get_orphan_data()) == 0 def test_export_separate_dynamic_and_static_objects(setup_data): @@ -196,7 +239,7 @@ def test_export_separate_dynamic_and_static_objects(setup_data): # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") @@ -207,15 +250,18 @@ def test_export_separate_dynamic_and_static_objects(setup_data): bpy.data.objects["Cube"]["dynamic"] = True auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_scene_settings=True, export_blueprints=True, export_separate_dynamic_and_static_objects = True ) - assert os.path.exists(os.path.join(setup_data["models_path"], "World.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "World_dynamic.glb")) == True + assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["levels_path"], "World_dynamic.glb")) == True + assert len(get_orphan_data()) == 0 def test_export_should_not_generate_orphan_data(setup_data): @@ -224,7 +270,7 @@ def test_export_should_not_generate_orphan_data(setup_data): # first, configure things # we use the global settings for that export_props = { - "main_scene_names" : ['World'], + "level_scene_names" : ['World'], "library_scene_names": ['Library'] } stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") @@ -232,11 +278,14 @@ def test_export_should_not_generate_orphan_data(setup_data): stored_settings.write(json.dumps(export_props)) auto_export_operator( + auto_export=True, direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), export_output_folder="./models", export_scene_settings=True, - export_blueprints=False, + export_blueprints=True, ) - assert os.path.exists(os.path.join(setup_data["models_path"], "World.glb")) == True - assert os.path.exists(os.path.join(setup_data["models_path"], "library", "Blueprint1.glb")) == False + assert os.path.exists(os.path.join(setup_data["levels_path"], "World.glb")) == True + assert os.path.exists(os.path.join(setup_data["blueprints_path"],"Blueprint1.glb")) == True + assert len(get_orphan_data()) == 0 diff --git a/tools/blenvy/tests/test_helpers.py b/tools/blenvy/tests/test_helpers.py new file mode 100644 index 0000000..f9169e3 --- /dev/null +++ b/tools/blenvy/tests/test_helpers.py @@ -0,0 +1,78 @@ +import bpy +import os +import json +import pathlib + +def prepare_auto_export(auto_export_overrides={}, gltf_export_settings = {"export_animations": False, "export_optimize_animation_size": False}): + # with change detection + # first, configure things + # we use the global settings for that + export_props = { + "level_scene_names" : ['World'], + "library_scene_names": ['Library'], + **auto_export_overrides + } + + # store settings for the auto_export part + stored_auto_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") + stored_auto_settings.clear() + stored_auto_settings.write(json.dumps(export_props)) + + gltf_settings = gltf_export_settings + # and store settings for the gltf part + stored_gltf_settings = bpy.data.texts[".blenvy_gltf_settings"] if ".blenvy_gltf_settings" in bpy.data.texts else bpy.data.texts.new(".blenvy_gltf_settings") + stored_gltf_settings.clear() + stored_gltf_settings.write(json.dumps(gltf_settings)) + +def run_auto_export(setup_data): + auto_export_operator = bpy.ops.export_scenes.auto_gltf + auto_export_operator( + auto_export=True, + direct_mode=True, + project_root_path = os.path.abspath(setup_data["root_path"]), + export_output_folder="./models", + export_scene_settings=True, + export_blueprints=True, + export_materials_library=False + ) + + levels_path = setup_data["levels_path"] + level_file_paths = list(map(lambda file_name: os.path.join(levels_path, file_name), sorted(os.listdir(levels_path)))) if os.path.exists(levels_path) else [] + + blueprints_path = setup_data["blueprints_path"] + blueprints_file_paths = list(map(lambda file_name: os.path.join(blueprints_path, file_name), sorted(os.listdir(blueprints_path)))) if os.path.exists(blueprints_path) else [] + + modification_times = list(map(lambda file_path: os.path.getmtime(file_path), blueprints_file_paths + level_file_paths)) + # assert os.path.exists(world_file_path) == True + + mapped_files_to_timestamps_and_index = {} + for (index, file_path) in enumerate(blueprints_file_paths + level_file_paths): + file_path = pathlib.Path(file_path).stem + mapped_files_to_timestamps_and_index[file_path] = (modification_times[index], index) + + return (modification_times, mapped_files_to_timestamps_and_index) + +def run_auto_export_and_compare(setup_data, changes, expected_changed_files = []): + (modification_times_first, mapped ) = run_auto_export(setup_data) + for index, change in enumerate(changes): + change() + (modification_times, mapped ) = run_auto_export(setup_data) + + changed_files = expected_changed_files[index] + changed_file_indices = [mapped[changed_file][1] for changed_file in changed_files] + print("changed files", changed_files, changed_file_indices, "mapped", mapped) + other_files_modification_times = [value for index, value in enumerate(modification_times) if index not in changed_file_indices] + other_files_modification_times_first = [value for index, value in enumerate(modification_times_first) if index not in changed_file_indices] + + print("other_files_modification_times_new ", other_files_modification_times) + print("other_files_modification_times_first", other_files_modification_times_first) + for changed_file_index in changed_file_indices: + #print("modification_times_new [changed_file_index]", modification_times[changed_file_index]) + #print("modification_times_first[changed_file_index]", modification_times_first[changed_file_index]) + if changed_file_index in modification_times_first and changed_file_index in modification_times: + assert modification_times[changed_file_index] != modification_times_first[changed_file_index], f"failure in change: {index}, at file {changed_file_index}" + # TODO: we should throw an error in the "else" case ? + assert other_files_modification_times == other_files_modification_times_first , f"failure in change: {index}" + + # reset the comparing + modification_times_first = modification_times \ No newline at end of file diff --git a/tools/bevy_components/tests/test_registry.py b/tools/blenvy/tests/test_registry.py similarity index 53% rename from tools/bevy_components/tests/test_registry.py rename to tools/blenvy/tests/test_registry.py index e13bb10..8ed5d7a 100644 --- a/tools/bevy_components/tests/test_registry.py +++ b/tools/blenvy/tests/test_registry.py @@ -3,20 +3,19 @@ from .setup_data import setup_data def test_blend(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - short_name = "BasicTest" - component_type = registry.short_names_to_long_names[short_name] + long_name = "bevy_example::test_components::BasicTest" add_component_operator = bpy.ops.object.add_bevy_component - add_component_operator(component_type=component_type) + add_component_operator(component_type=long_name) - property_group_name = registry.get_propertyGroupName_from_shortName(short_name) + property_group_name = registry.get_propertyGroupName_from_longName(long_name) object = bpy.context.object target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) propertyGroup = getattr(component_meta, property_group_name, None) diff --git a/tools/bevy_components/tests/test_rename_components.py b/tools/blenvy/tests/test_rename_components.py similarity index 53% rename from tools/bevy_components/tests/test_rename_components.py rename to tools/blenvy/tests/test_rename_components.py index 13efed6..eb93fd1 100644 --- a/tools/bevy_components/tests/test_rename_components.py +++ b/tools/blenvy/tests/test_rename_components.py @@ -4,105 +4,107 @@ import bpy import pprint import pytest +from ..bevy_components.components.metadata import get_bevy_component_value_by_long_name, get_bevy_components, is_bevy_component_in_item, upsert_bevy_component + from .setup_data import setup_data # small helpers def get_component_metadata(object, component_name): target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == component_name, target_components_metadata), None) + component_meta = next(filter(lambda component: component["long_name"] == component_name, target_components_metadata), None) return component_meta def get_component_propGroup(registry, component_name, component_meta): # component_type = registry.short_names_to_long_names[component_name] # add_component_operator = bpy.ops.object.add_bevy_component - property_group_name = registry.get_propertyGroupName_from_shortName(component_name) + property_group_name = registry.get_propertyGroupName_from_longName(component_name) propertyGroup = getattr(component_meta, property_group_name, None) return propertyGroup def test_rename_component_single_unit_struct(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - rename_component_operator = bpy.ops.object.rename_bevy_component + rename_component_operator = bpy.ops.blenvy.component_rename object = bpy.context.object - source_component_name = "SomeOldUnitStruct" - target_component_name = "UnitTest" - object[source_component_name] = '()' + source_component_name = "bevy_example::test_components::SomeOldUnitStruct" + target_component_name = "bevy_example::test_components::UnitTest" + upsert_bevy_component(object, source_component_name, '()') rename_component_operator(original_name=source_component_name, new_name=target_component_name, target_objects=json.dumps([object.name])) - is_old_component_in_object = source_component_name in object - is_new_component_in_object = target_component_name in object + is_old_component_in_object = is_bevy_component_in_item(object, source_component_name) + is_new_component_in_object = is_bevy_component_in_item(object, target_component_name) assert is_old_component_in_object == False assert is_new_component_in_object == True - assert object[target_component_name] == '()' - assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) != None + assert get_bevy_component_value_by_long_name(object, target_component_name) == '()' + assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) is not None def test_rename_component_single_complex_struct(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - rename_component_operator = bpy.ops.object.rename_bevy_component + rename_component_operator = bpy.ops.blenvy.component_rename object = bpy.context.object - source_component_name = "ProxyCollider" - target_component_name = "Collider" - object[source_component_name] = 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' + source_component_name = "bevy_example::test_components::ProxyCollider" + target_component_name = "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider" + upsert_bevy_component(object, source_component_name, 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)') rename_component_operator(original_name=source_component_name, new_name=target_component_name, target_objects=json.dumps([object.name])) - is_old_component_in_object = source_component_name in object - is_new_component_in_object = target_component_name in object + is_old_component_in_object = is_bevy_component_in_item(object, source_component_name) + is_new_component_in_object = is_bevy_component_in_item(object, target_component_name) assert is_old_component_in_object == False assert is_new_component_in_object == True - assert object[target_component_name] == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' - assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) != None + assert get_bevy_component_value_by_long_name(object, target_component_name) == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' + assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) is not None def test_rename_component_bulk(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - rename_component_operator = bpy.ops.object.rename_bevy_component + rename_component_operator = bpy.ops.blenvy.component_rename - source_component_name = "SomeOldUnitStruct" - target_component_name = "UnitTest" + source_component_name = "bevy_example::test_components::SomeOldUnitStruct" + target_component_name = "bevy_example::test_components::UnitTest" objects_names = [] for object in bpy.data.objects: - object[source_component_name] = '()' + upsert_bevy_component(object, source_component_name, '()') objects_names.append(object.name) # bulk rename rename_component_operator(original_name=source_component_name, new_name=target_component_name, target_objects=json.dumps(objects_names)) for object in bpy.data.objects: - is_old_component_in_object = source_component_name in object - is_new_component_in_object = target_component_name in object + is_old_component_in_object = is_bevy_component_in_item(object, source_component_name) + is_new_component_in_object = is_bevy_component_in_item(object, target_component_name) assert is_old_component_in_object == False assert is_new_component_in_object == True - assert object[target_component_name] == '()' - assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) != None + assert get_bevy_component_value_by_long_name(object, target_component_name) == '()' + assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) is not None def test_rename_component_single_error_handling(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - rename_component_operator = bpy.ops.object.rename_bevy_component + rename_component_operator = bpy.ops.blenvy.component_rename object = bpy.context.object - source_component_name = "SomeOldUnitStruct" - target_component_name = "UnitTest" - object[source_component_name] = 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' + source_component_name = "bevy_example::test_components::SomeOldUnitStruct" + target_component_name = "bevy_example::test_components::UnitTest" + upsert_bevy_component(object, source_component_name, 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)') expected_error = f'Error: Failed to rename component: Errors:["wrong custom property values to generate target component: object: \'{object.name}\', error: input string too big for a unit struct"]\n' expected_error = re.escape(expected_error) @@ -111,28 +113,28 @@ def test_rename_component_single_error_handling(setup_data): target_component_metadata = get_component_metadata(object, target_component_name) - is_old_component_in_object = source_component_name in object - is_new_component_in_object = target_component_name in object + is_old_component_in_object = is_bevy_component_in_item(object, source_component_name) + is_new_component_in_object = is_bevy_component_in_item(object, target_component_name) assert is_old_component_in_object == False assert is_new_component_in_object == True - assert object[target_component_name] == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' - assert get_component_propGroup(registry, target_component_name, target_component_metadata) != None + assert get_bevy_component_value_by_long_name(object, target_component_name) == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' + assert get_component_propGroup(registry, target_component_name, target_component_metadata) is not None assert target_component_metadata.invalid == True assert target_component_metadata.invalid_details == 'wrong custom property value, overwrite them by changing the values in the ui or change them & regenerate' def test_rename_component_single_error_handling_clean_errors(setup_data): registry = bpy.context.window_manager.components_registry - registry.schemaPath = setup_data["schema_path"] + registry.schema_path = setup_data["components_schemaPath"] bpy.ops.object.reload_registry() - rename_component_operator = bpy.ops.object.rename_bevy_component + rename_component_operator = bpy.ops.blenvy.component_rename object = bpy.context.object - source_component_name = "SomeOldUnitStruct" - target_component_name = "UnitTest" - object[source_component_name] = 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' + source_component_name = "bevy_example::test_components::SomeOldUnitStruct" + target_component_name = "bevy_example::test_components::UnitTest" + upsert_bevy_component(object, source_component_name, 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)') expected_error = f'Error: Failed to rename component: Errors:["wrong custom property values to generate target component: object: \'{object.name}\', error: input string too big for a unit struct"]\n' expected_error = re.escape(expected_error) @@ -141,12 +143,12 @@ def test_rename_component_single_error_handling_clean_errors(setup_data): target_component_metadata = get_component_metadata(object, target_component_name) - is_old_component_in_object = source_component_name in object - is_new_component_in_object = target_component_name in object + is_old_component_in_object = is_bevy_component_in_item(object, source_component_name) + is_new_component_in_object = is_bevy_component_in_item(object, target_component_name) assert is_old_component_in_object == False assert is_new_component_in_object == True - assert object[target_component_name] == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' - assert get_component_propGroup(registry, target_component_name, target_component_metadata) != None + assert get_bevy_component_value_by_long_name(object, target_component_name) == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)' + assert get_component_propGroup(registry, target_component_name, target_component_metadata) is not None assert target_component_metadata.invalid == True assert target_component_metadata.invalid_details == 'wrong custom property value, overwrite them by changing the values in the ui or change them & regenerate' diff --git a/tools/blenvy/tests/test_shuffler.py b/tools/blenvy/tests/test_shuffler.py new file mode 100644 index 0000000..d86fc7c --- /dev/null +++ b/tools/blenvy/tests/test_shuffler.py @@ -0,0 +1,150 @@ +import bpy +from .component_values_shuffler import component_values_shuffler +from ..bevy_components.components.metadata import get_bevy_component_value_by_long_name, get_bevy_components, upsert_bevy_component +from .setup_data import setup_data + +def test_shuffler(setup_data): + registry = bpy.context.window_manager.components_registry + registry.schema_path = setup_data["schema_path"] + bpy.ops.object.reload_registry() + + type_infos = registry.type_infos + object = bpy.context.object + + add_component_operator = bpy.ops.object.add_bevy_component + + long_name = "bevy_example::test_components::BasicTest" + add_component_operator(component_type=long_name) + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 10, property_group=propertyGroup, definition=definition, registry=registry) + + assert getattr(propertyGroup, 'a') == 0.5714026093482971 + assert getattr(propertyGroup, 'b') == 54 + assert getattr(propertyGroup, 'c') == "psagopiu" + + + # Testing a more complex component + long_name = "bevy_example::test_components::NestingTestLevel2" + add_component_operator(component_type=long_name) + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + #print("propertyGroup", object[long_name]) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == '(basic: (a: 0.5219839215278625, b: 38, c: "ljfywwrv"), color: (Rgba(red:0.2782765030860901, green:0.9174930453300476, blue:0.24890311062335968, alpha:0.815186083316803)), colors_list: ([Rgba(red:0.2523837685585022, green:0.5016026496887207, blue:0.317435085773468, alpha:0.8463277816772461), Rgba(red:0.945193886756897, green:0.4015909433364868, blue:0.9984470009803772, alpha:0.06219279021024704)]), enable: true, enum_inner: Wood, nested: (vec: (Vec3(x:0.1509154736995697, y:0.7055686116218567, z:0.5588918924331665))), text: "vgkrdwuc", toggle: (false))' + + + # And another complex component + long_name = "bevy_example::test_components::EnumComplex" + add_component_operator(component_type=long_name) + + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", get_bevy_component_value_by_long_name(object, long_name)) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == 'StructLike(a: 0.41416797041893005, b: 38, c: "ljfywwrv")' + + # And another complex component + long_name = "bevy_animation::AnimationPlayer" + add_component_operator(component_type=long_name) + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", get_bevy_component_value_by_long_name(object, long_name)) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == '(animation: "", paused: true)' + + + + # And another complex component + long_name = "bevy_example::test_components::VecOfColors" + add_component_operator(component_type=long_name) + + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", get_bevy_component_value_by_long_name(object, long_name)) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == '([Rgba(red:0.8066907525062561, green:0.9604947566986084, blue:0.2896253764629364, alpha:0.766107439994812), Rgba(red:0.7042198777198792, green:0.6613830327987671, blue:0.11016204953193665, alpha:0.02693677879869938)])' + + + # And another complex component + long_name = "bevy_example::test_components::VecOfF32s" + add_component_operator(component_type=long_name) + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", get_bevy_component_value_by_long_name(object, long_name)) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == '([0.8066907525062561, 0.9604947566986084])' + + # And another complex component + long_name = "bevy_render::mesh::mesh::skinning::SkinnedMesh" + add_component_operator(component_type=long_name) + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", get_bevy_component_value_by_long_name(object, long_name)) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == '(inverse_bindposes: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")), joints: [0, 0])' + + + # And another complex component + long_name = "bevy_render::camera::camera::CameraRenderGraph" + add_component_operator(component_type=long_name) + + property_group_name = registry.get_propertyGroupName_from_longName(long_name) + target_components_metadata = object.components_meta.components + component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None) + propertyGroup = getattr(component_meta, property_group_name, None) + + definition = type_infos[long_name] + component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry) + + print("propertyGroup", get_bevy_component_value_by_long_name(object, long_name)) + # cheating / making things easier for us for complex types: we use the custom property value + assert get_bevy_component_value_by_long_name(object, long_name) == 'None' + \ No newline at end of file diff --git a/tools/gltf_auto_export/__init__.py b/tools/gltf_auto_export/__init__.py deleted file mode 100644 index 3f06c12..0000000 --- a/tools/gltf_auto_export/__init__.py +++ /dev/null @@ -1,99 +0,0 @@ -bl_info = { - "name": "gltf_auto_export", - "author": "kaosigh", - "version": (0, 16, 1), - "blender": (3, 4, 0), - "location": "File > Import-Export", - "description": "glTF/glb auto-export", - "warning": "", - "wiki_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow", - "tracker_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow/issues/new", - "category": "Import-Export" -} -import bpy - -from .auto_export.operators import AutoExportGLTF -from .auto_export.tracker import AutoExportTracker -from .auto_export.preferences import (AutoExportGltfAddonPreferences) - -from .auto_export.internals import (SceneLink, - SceneLinks, - CollectionToExport, - CollectionsToExport, - CUSTOM_PG_sceneName - ) -from .ui.main import (GLTF_PT_auto_export_main, - GLTF_PT_auto_export_root, - GLTF_PT_auto_export_blueprints, - GLTF_PT_auto_export_collections_list, - GLTF_PT_auto_export_gltf, - SCENE_UL_GLTF_auto_export, - ) -from .ui.operators import (SCENES_LIST_OT_actions) - - -###################################################### -""" there are two places where we load settings for auto_export from: -- in ui/main AutoExportGLTF -> invoke -- in auto_export.py -> auto_export -This is a workaround needed because of the way the settings are stored , perhaps there is a better way to deal with it ? ie by calling the AutoExportGLTF operator from the auto_export function ? -""" - - -#see here for original gltf exporter infos https://github.com/KhronosGroup/glTF-Blender-IO/blob/main/addons/io_scene_gltf2/__init__.py -classes = [ - SceneLink, - SceneLinks, - CUSTOM_PG_sceneName, - SCENE_UL_GLTF_auto_export, - SCENES_LIST_OT_actions, - - AutoExportGLTF, - #AutoExportGltfAddonPreferences, - - CollectionToExport, - CollectionsToExport, - - GLTF_PT_auto_export_main, - GLTF_PT_auto_export_root, - GLTF_PT_auto_export_blueprints, - GLTF_PT_auto_export_collections_list, - GLTF_PT_auto_export_gltf, - - AutoExportTracker -] - -def menu_func_import(self, context): - self.layout.operator(AutoExportGLTF.bl_idname, text="glTF auto Export (.glb/gltf)") -from bpy.app.handlers import persistent - -@persistent -def post_update(scene, depsgraph): - bpy.context.window_manager.auto_export_tracker.deps_update_handler( scene, depsgraph) - -@persistent -def post_save(scene, depsgraph): - bpy.context.window_manager.auto_export_tracker.save_handler( scene, depsgraph) - - -def register(): - for cls in classes: - bpy.utils.register_class(cls) - # for some reason, adding these directly to the tracker class in register() do not work reliably - bpy.app.handlers.depsgraph_update_post.append(post_update) - bpy.app.handlers.save_post.append(post_save) - - # add our addon to the toolbar - bpy.types.TOPBAR_MT_file_export.append(menu_func_import) - -def unregister(): - for cls in classes: - bpy.utils.unregister_class(cls) - bpy.types.TOPBAR_MT_file_export.remove(menu_func_import) - - bpy.app.handlers.depsgraph_update_post.remove(post_update) - bpy.app.handlers.save_post.remove(post_save) - - -if "gltf_auto_export" == "__main__": - register() diff --git a/tools/gltf_auto_export/auto_export/auto_export.py b/tools/gltf_auto_export/auto_export/auto_export.py deleted file mode 100644 index 45ffac9..0000000 --- a/tools/gltf_auto_export/auto_export/auto_export.py +++ /dev/null @@ -1,159 +0,0 @@ -import os -import bpy -import traceback - -from .export_main_scenes import export_main_scene -from .export_blueprints import check_if_blueprint_on_disk, check_if_blueprints_exist, export_blueprints_from_collections - -from ..helpers.helpers_scenes import (get_scenes, ) -from ..helpers.helpers_collections import (get_collections_in_library, get_exportable_collections, get_collections_per_scene, find_collection_ascendant_target_collection) -from ..modules.export_materials import cleanup_materials, export_materials -from ..modules.bevy_scene_components import upsert_scene_components - - -"""Main function""" -def auto_export(changes_per_scene, changed_export_parameters, addon_prefs): - # have the export parameters (not auto export, just gltf export) have changed: if yes (for example switch from glb to gltf, compression or not, animations or not etc), we need to re-export everything - print ("changed_export_parameters", changed_export_parameters) - - try: - file_path = bpy.data.filepath - # Get the folder - folder_path = os.path.dirname(file_path) - # get the preferences for our addon - - #should we use change detection or not - export_change_detection = getattr(addon_prefs, "export_change_detection") - - export_blueprints = getattr(addon_prefs,"export_blueprints") - export_output_folder = getattr(addon_prefs,"export_output_folder") - - export_materials_library = getattr(addon_prefs,"export_materials_library") - export_scene_settings = getattr(addon_prefs,"export_scene_settings") - - [main_scene_names, level_scenes, library_scene_names, library_scenes] = get_scenes(addon_prefs) - - print("main scenes", main_scene_names, "library_scenes", library_scene_names) - print("export_output_folder", export_output_folder) - - if export_scene_settings: - # inject/ update scene components - upsert_scene_components(bpy.context.scene, bpy.context.scene.world, main_scene_names) - #inject/ update light shadow information - for light in bpy.data.lights: - enabled = 'true' if light.use_shadow else 'false' - light['BlenderLightShadows'] = f"(enabled: {enabled}, buffer_bias: {light.shadow_buffer_bias})" - - # export - if export_blueprints: - print("EXPORTING") - # create parent relations for all collections - collection_parents = dict() - for collection in bpy.data.collections: - collection_parents[collection.name] = None - for collection in bpy.data.collections: - for ch in collection.children: - collection_parents[ch.name] = collection.name - - # get a list of all collections actually in use - (collections, blueprint_hierarchy) = get_exportable_collections(level_scenes, library_scenes, addon_prefs) - - # first check if all collections have already been exported before (if this is the first time the exporter is run - # in your current Blender session for example) - export_blueprints_path = os.path.join(folder_path, export_output_folder, getattr(addon_prefs,"export_blueprints_path")) if getattr(addon_prefs,"export_blueprints_path") != '' else folder_path - export_levels_path = os.path.join(folder_path, export_output_folder) - - gltf_extension = getattr(addon_prefs, "export_format") - gltf_extension = '.glb' if gltf_extension == 'GLB' else '.gltf' - collections_not_on_disk = check_if_blueprints_exist(collections, export_blueprints_path, gltf_extension) - changed_collections = [] - - for scene, objects in changes_per_scene.items(): - print(" changed scene", scene) - for obj_name, obj in objects.items(): - object_collections = list(obj.users_collection) if hasattr(obj, 'users_collection') else [] - object_collection_names = list(map(lambda collection: collection.name, object_collections)) - - if len(object_collection_names) > 1: - print("ERRROR for",obj_name,"objects in multiple collections not supported") - else: - object_collection_name = object_collection_names[0] if len(object_collection_names) > 0 else None - #recurse updwards until we find one of our collections (or not) - matching_collection = find_collection_ascendant_target_collection(collection_parents, collections, object_collection_name) - if matching_collection is not None: - changed_collections.append(matching_collection) - - collections_to_export = list(set(changed_collections + collections_not_on_disk)) if export_change_detection else collections - - # we need to re_export everything if the export parameters have been changed - collections_to_export = collections if changed_export_parameters else collections_to_export - collections_per_scene = get_collections_per_scene(collections_to_export, library_scenes) - - - # collections that do not come from a library should not be exported as seperate blueprints - # FIMXE: logic is erroneous, needs to be changed - library_collections = get_collections_in_library(library_scenes) - collections_to_export = list(set(collections_to_export).intersection(set(library_collections))) - - # since materials export adds components we need to call this before blueprints are exported - # export materials & inject materials components into relevant objects - if export_materials_library: - export_materials(collections, library_scenes, folder_path, addon_prefs) - - - print("--------------") - print("collections: all:", collections) - print("collections: changed:", changed_collections) - print("collections: not found on disk:", collections_not_on_disk) - print("collections: in library:", library_collections) - print("collections: to export:", collections_to_export) - print("collections: per_scene:", collections_per_scene) - - # backup current active scene - old_current_scene = bpy.context.scene - # backup current selections - old_selections = bpy.context.selected_objects - - # first export any main/level/world scenes - print("export MAIN scenes") - for scene_name in main_scene_names: - # we have more relaxed rules to determine if the main scenes have changed : any change is ok, (allows easier handling of changes, render settings etc) - do_export_main_scene = not export_change_detection or changed_export_parameters or scene_name in changes_per_scene.keys() or not check_if_blueprint_on_disk(scene_name, export_levels_path, gltf_extension) - if do_export_main_scene: - print(" exporting scene:", scene_name) - export_main_scene(bpy.data.scenes[scene_name], folder_path, addon_prefs, library_collections) - - - # now deal with blueprints/collections - do_export_library_scene = not export_change_detection or changed_export_parameters or len(collections_to_export) > 0 # export_library_scene_name in changes_per_scene.keys() - print("export LIBRARY") - if do_export_library_scene: - # we only want to go through the library scenes where our collections to export are present - for (scene_name, collections_to_export) in collections_per_scene.items(): - print(" exporting collections from scene:", scene_name) - print(" collections to export", collections_to_export) - library_scene = bpy.data.scenes[scene_name] - export_blueprints_from_collections(collections_to_export, library_scene, folder_path, addon_prefs, blueprint_hierarchy, collections) - - # reset current scene from backup - bpy.context.window.scene = old_current_scene - - # reset selections - for obj in old_selections: - obj.select_set(True) - if export_materials_library: - cleanup_materials(collections, library_scenes) - - else: - for scene_name in main_scene_names: - export_main_scene(bpy.data.scenes[scene_name], folder_path, addon_prefs, []) - - except Exception as error: - print(traceback.format_exc()) - - def error_message(self, context): - self.layout.label(text="Failure during auto_export: Error: "+ str(error)) - - bpy.context.window_manager.popup_menu(error_message, title="Error", icon='ERROR') - - diff --git a/tools/gltf_auto_export/auto_export/export_blueprints.py b/tools/gltf_auto_export/auto_export/export_blueprints.py deleted file mode 100644 index 836a6f2..0000000 --- a/tools/gltf_auto_export/auto_export/export_blueprints.py +++ /dev/null @@ -1,81 +0,0 @@ -import os -import bpy - -from ..helpers.generate_and_export import generate_and_export -from .export_gltf import (generate_gltf_export_preferences) -from ..helpers.helpers_scenes import clear_hollow_scene, copy_hollowed_collection_into - -# export collections: all the collections that have an instance in the main scene AND any marked collections, even if they do not have instances -def export_collections(collections, folder_path, library_scene, addon_prefs, gltf_export_preferences, blueprint_hierarchy, library_collections): - - # save current active collection - active_collection = bpy.context.view_layer.active_layer_collection - export_materials_library = getattr(addon_prefs,"export_materials_library") - - for collection_name in collections: - print("exporting collection", collection_name) - gltf_output_path = os.path.join(folder_path, collection_name) - export_settings = { **gltf_export_preferences, 'use_active_scene': True, 'use_active_collection': True, 'use_active_collection_with_nested':True} - - # if we are using the material library option, do not export materials, use placeholder instead - if export_materials_library: - export_settings['export_materials'] = 'PLACEHOLDER' - - collection = bpy.data.collections[collection_name] - generate_and_export( - addon_prefs, - temp_scene_name="__temp_scene_"+collection.name, - export_settings=export_settings, - gltf_output_path=gltf_output_path, - tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(collection, temp_collection, library_collections=library_collections, addon_prefs=addon_prefs), - tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=collection, temp_scene=temp_scene, **params) - ) - # reset active collection to the one we save before - bpy.context.view_layer.active_layer_collection = active_collection - - -def export_blueprints_from_collections(collections, library_scene, folder_path, addon_prefs, blueprint_hierarchy, library_collections): - export_output_folder = getattr(addon_prefs,"export_output_folder") - gltf_export_preferences = generate_gltf_export_preferences(addon_prefs) - export_blueprints_path = os.path.join(folder_path, export_output_folder, getattr(addon_prefs,"export_blueprints_path")) if getattr(addon_prefs,"export_blueprints_path") != '' else folder_path - - try: - export_collections(collections, export_blueprints_path, library_scene, addon_prefs, gltf_export_preferences, blueprint_hierarchy, library_collections) - except Exception as error: - print("failed to export collections to gltf: ", error) - raise error - -# TODO : add a flag to also search of deeply nested components -def get_nested_components(object): - if object.instance_type == 'COLLECTION': - collection_name = object.instance_collection.name - collection = bpy.data.collections[collection_name] - all_objects = collection.all_objects - result = [] - for object in all_objects: - components = dict(object) - if len(components.keys()) > 0: - result += [(object, components)] - return result - return [] - #for collection in traverse_tree(collection): - # for object in collection.all_objects - - -def check_if_blueprints_exist(collections, folder_path, extension): - not_found_blueprints = [] - for collection_name in collections: - gltf_output_path = os.path.join(folder_path, collection_name + extension) - # print("gltf_output_path", gltf_output_path) - found = os.path.exists(gltf_output_path) and os.path.isfile(gltf_output_path) - if not found: - not_found_blueprints.append(collection_name) - return not_found_blueprints - - -def check_if_blueprint_on_disk(scene_name, folder_path, extension): - gltf_output_path = os.path.join(folder_path, scene_name + extension) - found = os.path.exists(gltf_output_path) and os.path.isfile(gltf_output_path) - print("level", scene_name, "found", found, "path", gltf_output_path) - return found - diff --git a/tools/gltf_auto_export/auto_export/export_gltf.py b/tools/gltf_auto_export/auto_export/export_gltf.py deleted file mode 100644 index 11fb4da..0000000 --- a/tools/gltf_auto_export/auto_export/export_gltf.py +++ /dev/null @@ -1,53 +0,0 @@ -import os -import bpy -from .preferences import (AutoExportGltfPreferenceNames) - -def generate_gltf_export_preferences(addon_prefs): - # default values - gltf_export_preferences = dict( - export_format= 'GLB', #'GLB', 'GLTF_SEPARATE', 'GLTF_EMBEDDED' - check_existing=False, - - use_selection=False, - use_visible=True, # Export visible and hidden objects. See Object/Batch Export to skip. - use_renderable=False, - use_active_collection= False, - use_active_collection_with_nested=False, - use_active_scene = False, - - export_texcoords=True, - export_normals=True, - # here add draco settings - export_draco_mesh_compression_enable = False, - - export_tangents=False, - #export_materials - export_colors=True, - export_attributes=True, - #use_mesh_edges - #use_mesh_vertices - export_cameras=True, - export_extras=True, # For custom exported properties. - export_lights=True, - export_yup=True, - export_skins=True, - export_morph=False, - export_apply=False, - export_animations=False, - export_optimize_animation_size=False - ) - - for key in addon_prefs.__annotations__.keys(): - if str(key) not in AutoExportGltfPreferenceNames: - #print("overriding setting", key, "value", getattr(addon_prefs,key)) - gltf_export_preferences[key] = getattr(addon_prefs,key) - - return gltf_export_preferences - - -#https://docs.blender.org/api/current/bpy.ops.export_scene.html#bpy.ops.export_scene.gltf -def export_gltf (path, export_settings): - settings = {**export_settings, "filepath": path} - # print("export settings",settings) - os.makedirs(os.path.dirname(path), exist_ok=True) - bpy.ops.export_scene.gltf(**settings) diff --git a/tools/gltf_auto_export/auto_export/export_main_scenes.py b/tools/gltf_auto_export/auto_export/export_main_scenes.py deleted file mode 100644 index 7df4025..0000000 --- a/tools/gltf_auto_export/auto_export/export_main_scenes.py +++ /dev/null @@ -1,78 +0,0 @@ -import os -import bpy - -from ..helpers.generate_and_export import generate_and_export -from .export_gltf import (generate_gltf_export_preferences, export_gltf) -from ..modules.bevy_dynamic import is_object_dynamic, is_object_static -from ..helpers.helpers_scenes import clear_hollow_scene, copy_hollowed_collection_into, inject_blueprints_list_into_main_scene, remove_blueprints_list_from_main_scene - - -# export all main scenes -def export_main_scenes(scenes, folder_path, addon_prefs): - for scene in scenes: - export_main_scene(scene, folder_path, addon_prefs) - -def export_main_scene(scene, folder_path, addon_prefs, library_collections): - gltf_export_preferences = generate_gltf_export_preferences(addon_prefs) - export_output_folder = getattr(addon_prefs,"export_output_folder") - export_blueprints = getattr(addon_prefs,"export_blueprints") - legacy_mode = getattr(addon_prefs, "export_legacy_mode") - export_separate_dynamic_and_static_objects = getattr(addon_prefs, "export_separate_dynamic_and_static_objects") - - gltf_output_path = os.path.join(folder_path, export_output_folder, scene.name) - export_settings = { **gltf_export_preferences, - 'use_active_scene': True, - 'use_active_collection':True, - 'use_active_collection_with_nested':True, - 'use_visible': False, - 'use_renderable': False, - 'export_apply':True - } - - if export_blueprints : - if not legacy_mode: - inject_blueprints_list_into_main_scene(scene) - - if export_separate_dynamic_and_static_objects: - #print("SPLIT STATIC AND DYNAMIC") - # first export static objects - generate_and_export( - addon_prefs, - temp_scene_name="__temp_scene", - export_settings=export_settings, - gltf_output_path=gltf_output_path, - tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(scene.collection, temp_collection, library_collections=library_collections, filter=is_object_static, addon_prefs=addon_prefs), - tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=scene.collection, temp_scene=temp_scene, **params) - ) - - # then export all dynamic objects - gltf_output_path = os.path.join(folder_path, export_output_folder, scene.name+ "_dynamic") - generate_and_export( - addon_prefs, - temp_scene_name="__temp_scene", - export_settings=export_settings, - gltf_output_path=gltf_output_path, - tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(scene.collection, temp_collection, library_collections=library_collections, filter=is_object_dynamic, addon_prefs=addon_prefs), - tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=scene.collection, temp_scene=temp_scene, **params) - ) - - else: - #print("NO SPLIT") - generate_and_export( - addon_prefs, - temp_scene_name="__temp_scene", - export_settings=export_settings, - gltf_output_path=gltf_output_path, - tempScene_filler= lambda temp_collection: copy_hollowed_collection_into(scene.collection, temp_collection, library_collections=library_collections, addon_prefs=addon_prefs), - tempScene_cleaner= lambda temp_scene, params: clear_hollow_scene(original_root_collection=scene.collection, temp_scene=temp_scene, **params) - ) - - else: - print(" exporting gltf to", gltf_output_path, ".gltf/glb") - export_gltf(gltf_output_path, export_settings) - - if not legacy_mode: - remove_blueprints_list_from_main_scene(scene) - - - diff --git a/tools/gltf_auto_export/auto_export/internals.py b/tools/gltf_auto_export/auto_export/internals.py deleted file mode 100644 index 22ce6f0..0000000 --- a/tools/gltf_auto_export/auto_export/internals.py +++ /dev/null @@ -1,22 +0,0 @@ -import bpy - -class SceneLink(bpy.types.PropertyGroup): - name: bpy.props.StringProperty(name="") - scene: bpy.props.PointerProperty(type=bpy.types.Scene) - -class SceneLinks(bpy.types.PropertyGroup): - name = bpy.props.StringProperty(name="List of scenes to export", default="Unknown") - items: bpy.props.CollectionProperty(type = SceneLink) - -class CUSTOM_PG_sceneName(bpy.types.PropertyGroup): - name: bpy.props.StringProperty() - display: bpy.props.BoolProperty() - -class CollectionToExport(bpy.types.PropertyGroup): - name: bpy.props.StringProperty(name="") - -class CollectionsToExport(bpy.types.PropertyGroup): - name = bpy.props.StringProperty(name="List of collections to export", default="Unknown") - items: bpy.props.CollectionProperty(type = CollectionToExport) - - diff --git a/tools/gltf_auto_export/auto_export/operators.py b/tools/gltf_auto_export/auto_export/operators.py deleted file mode 100644 index d252bea..0000000 --- a/tools/gltf_auto_export/auto_export/operators.py +++ /dev/null @@ -1,222 +0,0 @@ -import json -import bpy -from bpy.types import Operator -from bpy_extras.io_utils import ExportHelper -from bpy.props import (IntProperty, StringProperty) -from .preferences import (AutoExportGltfAddonPreferences, AutoExportGltfPreferenceNames) -from ..helpers.helpers_scenes import (get_scenes) -from ..helpers.helpers_collections import (get_exportable_collections) -from .auto_export import auto_export - -class AutoExportGLTF(Operator, AutoExportGltfAddonPreferences, ExportHelper): - """auto export gltf""" - #bl_idname = "object.xxx" - bl_idname = "export_scenes.auto_gltf" - bl_label = "Apply settings" - bl_options = {'PRESET', 'UNDO'} - # ExportHelper mixin class uses this - filename_ext = '' - - #list of settings (other than purely gltf settings) whose change should trigger a re-generation of gltf files - white_list = ['auto_export', - 'export_main_scene_name', - 'export_output_folder', - 'export_library_scene_name', - 'export_change_detection', - 'export_blueprints', - 'export_blueprints_path', - - 'export_marked_assets', - 'collection_instances_combine_mode', - 'export_separate_dynamic_and_static_objects', - - 'export_materials_library', - 'export_materials_path', - - 'export_scene_settings' - 'export_legacy_mode' - ] - - @classmethod - def register(cls): - bpy.types.WindowManager.main_scene = bpy.props.PointerProperty(type=bpy.types.Scene, name="main scene", description="main_scene_picker", poll=cls.is_scene_ok) - bpy.types.WindowManager.library_scene = bpy.props.PointerProperty(type=bpy.types.Scene, name="library scene", description="library_scene_picker", poll=cls.is_scene_ok) - - bpy.types.WindowManager.main_scenes_list_index = IntProperty(name = "Index for main scenes list", default = 0) - bpy.types.WindowManager.library_scenes_list_index = IntProperty(name = "Index for library scenes list", default = 0) - bpy.types.WindowManager.previous_export_settings = StringProperty(default="") - - cls.main_scenes_index = 0 - cls.library_scenes_index = 0 - - @classmethod - def unregister(cls): - del bpy.types.WindowManager.main_scene - del bpy.types.WindowManager.library_scene - - del bpy.types.WindowManager.main_scenes_list_index - del bpy.types.WindowManager.library_scenes_list_index - - del bpy.types.WindowManager.previous_export_settings - - def is_scene_ok(self, scene): - try: - operator = bpy.context.space_data.active_operator - return scene.name not in operator.main_scenes and scene.name not in operator.library_scenes - except: - return True - - def save_settings(self, context): - # find all props to save - exceptional = [ - # options that don't start with 'export_' - 'collection_instances_combine_mode', - ] - all_props = self.properties - export_props = { - x: getattr(self, x) for x in dir(all_props) - if (x.startswith("export_") or x in exceptional) and all_props.get(x) is not None - } - # we inject all that we need, the above is not sufficient - for (k, v) in self.properties.items(): - if k in self.white_list or k not in AutoExportGltfPreferenceNames: - value = v - # FIXME: really weird having to do this - if k == "collection_instances_combine_mode": - value = self.collection_instances_combine_mode - if k == "export_format": - value = self.export_format - if k == "export_image_format": - value = self.export_image_format - if k == "export_materials": - value = self.export_materials - export_props[k] = value - # we add main & library scene names to our preferences - - export_props['main_scene_names'] = list(map(lambda scene_data: scene_data.name, getattr(self,"main_scenes"))) - export_props['library_scene_names'] = list(map(lambda scene_data: scene_data.name, getattr(self,"library_scenes"))) - self.properties['main_scene_names'] = export_props['main_scene_names'] - self.properties['library_scene_names'] = export_props['library_scene_names'] - - stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") - stored_settings.clear() - stored_settings.write(json.dumps(export_props)) - #print("saving settings", bpy.data.texts[".gltf_auto_export_settings"].as_string(), "raw", json.dumps(export_props)) - - def load_settings(self, context): - # print("loading settings") - settings = None - try: - settings = bpy.data.texts[".gltf_auto_export_settings"].as_string() - settings = json.loads(settings) - except: pass - - self.will_save_settings = False - if settings: - print("loading settings in invoke AutoExportGLTF", settings) - try: - for (k, v) in settings.items(): - print("loading setting", k, v) - setattr(self, k, v) - self.will_save_settings = True - - # Update filter if user saved settings - if hasattr(self, 'export_format'): - self.filter_glob = '*.glb' if self.export_format == 'GLB' else '*.gltf' - - # inject scenes data - if hasattr(self, 'main_scene_names'): - main_scenes = self.main_scenes - main_scenes.clear() - for item_name in self.main_scene_names: - item = main_scenes.add() - item.name = item_name - - if hasattr(self, 'library_scene_names'): - library_scenes = self.library_scenes - library_scenes.clear() - for item_name in self.library_scene_names: - item = library_scenes.add() - item.name = item_name - - except Exception as error: - print("error", error) - self.report({"ERROR"}, "Loading export settings failed. Removed corrupted settings") - bpy.data.texts.remove(bpy.data.texts[".gltf_auto_export_settings"]) - - def did_export_settings_change(self): - previous_export_settings = bpy.data.texts[".gltf_auto_export_gltf_settings"] if ".gltf_auto_export_gltf_settings" in bpy.data.texts else None - - # if there was no setting before, it is new, we need export - if previous_export_settings == None: - export_settings = {} - for (k, v) in self.properties.items(): - if k not in AutoExportGltfPreferenceNames: - export_settings[k] = v - export_settings = str(export_settings) - # the actual gltf export settings, not those of auto export - stored_export_settings = bpy.data.texts.new(".gltf_auto_export_gltf_settings") - stored_export_settings.write(export_settings) - return True - else: - export_settings = {} - for (k, v) in self.properties.items(): - if k in self.white_list or k not in AutoExportGltfPreferenceNames: - export_settings[k] = v - - if len(export_settings.keys()) == 0: # first time after we already used the addon, since we already have export settings, but they have not yet been applied - return False - - export_settings = str(export_settings) - changed = export_settings != previous_export_settings.as_string() - - previous_export_settings.clear() - previous_export_settings.write(export_settings) - return changed - - def execute(self, context): - # disable change detection while the operator runs - bpy.context.window_manager.auto_export_tracker.disable_change_detection() - if self.direct_mode: - self.load_settings(context) - if self.will_save_settings: - self.save_settings(context) - - changes_per_scene = context.window_manager.auto_export_tracker.changed_objects_per_scene - #determine changed parameters - params_changed = self.did_export_settings_change() - #& do the export - if self.direct_mode: #Do not auto export when applying settings in the menu, do it on save only - auto_export(changes_per_scene, params_changed, self) - # cleanup - bpy.app.timers.register(bpy.context.window_manager.auto_export_tracker.enable_change_detection, first_interval=1) - return {'FINISHED'} - - def invoke(self, context, event): - bpy.context.window_manager.auto_export_tracker.disable_change_detection() - self.load_settings(context) - - addon_prefs = self - [main_scene_names, level_scenes, library_scene_names, library_scenes]=get_scenes(addon_prefs) - (collections, _) = get_exportable_collections(level_scenes, library_scenes, addon_prefs) - - try: - # we save this list of collections in the context - bpy.context.window_manager.exportedCollections.clear() - #TODO: add error handling for this - for collection_name in collections: - ui_info = bpy.context.window_manager.exportedCollections.add() - ui_info.name = collection_name - except Exception as error: - self.report({"ERROR"}, "Failed to populate list of exported collections/blueprints") - - wm = context.window_manager - wm.fileselect_add(self) - - return {'RUNNING_MODAL'} - - def draw(self, context): - pass - - def cancel(self, context): - bpy.app.timers.register(bpy.context.window_manager.auto_export_tracker.enable_change_detection, first_interval=1) diff --git a/tools/gltf_auto_export/auto_export/preferences.py b/tools/gltf_auto_export/auto_export/preferences.py deleted file mode 100644 index e2467b1..0000000 --- a/tools/gltf_auto_export/auto_export/preferences.py +++ /dev/null @@ -1,417 +0,0 @@ - -from bpy.types import AddonPreferences - -from bpy.props import (BoolProperty, - IntProperty, - StringProperty, - EnumProperty, - CollectionProperty - ) - -from .internals import (CUSTOM_PG_sceneName) - -AutoExportGltfPreferenceNames = [ - 'auto_export', - 'export_main_scene_name', - 'export_output_folder', - 'export_library_scene_name', - 'export_change_detection', - - 'export_blueprints', - 'export_blueprints_path', - - 'export_marked_assets', - 'collection_instances_combine_mode', - 'export_separate_dynamic_and_static_objects', - 'export_legacy_mode', - - 'export_materials_library', - 'export_materials_path', - - 'export_scene_settings', - - 'main_scenes', - 'library_scenes', - 'main_scenes_index', - 'library_scenes_index', - - 'direct_mode',# specific to main auto_export operator - 'main_scene_names', - 'library_scene_names', - 'previous_export_settings', - 'filter_glob', - 'will_save_settings', -] - -class AutoExportGltfAddonPreferences(AddonPreferences): - # this must match the add-on name, use '__package__' - # when defining this in a submodule of a python package. - bl_idname = __package__ - bl_options = {'PRESET'} - - #### these are for the operator - filter_glob: StringProperty( - default='*.glb;*.gltf', - options={'HIDDEN'} - ) - - will_save_settings: BoolProperty( - name='Remember Export Settings', - description='Store glTF export settings in the Blender project', - default=True - ) - - # use when operator is called directly, works a bit differently than inside the ui - direct_mode: BoolProperty( - default=False - ) - - #### - auto_export: BoolProperty( - name='Auto export', - description='Automatically export to gltf on save', - default=True - ) - export_main_scene_name: StringProperty( - name='Main scene', - description='The name of the main scene/level/world to auto export', - default='Scene' - ) - export_output_folder: StringProperty( - name='Export folder (relative)', - description='The root folder for all exports(relative to current file) Defaults to current folder', - default='' - ) - export_library_scene_name: StringProperty( - name='Library scene', - description='The name of the library scene to auto export', - default='Library' - ) - export_change_detection: BoolProperty( - name='Change detection', - description='Use change detection to determine what/if should be exported', - default=True - ) - # scene components - export_scene_settings: BoolProperty( - name='Export scene settings', - description='Export scene settings ie AmbientLighting, Bloom, AO etc', - default=False - ) - - # blueprint settings - export_blueprints: BoolProperty( - name='Export Blueprints', - description='Replaces collection instances with an Empty with a BlueprintName custom property', - default=True - ) - export_blueprints_path: StringProperty( - name='Blueprints path', - description='path to export the blueprints to (relative to the Export folder)', - default='library' - ) - - export_materials_library: BoolProperty( - name='Export materials library', - description='remove materials from blueprints and use the material library instead', - default=False - ) - export_materials_path: StringProperty( - name='Materials path', - description='path to export the materials libraries to (relative to the root folder)', - default='materials' - ) - - """ combine mode can be - - 'Split' (default): replace with an empty, creating links to sub blueprints - - 'Embed' : treat it as an embeded object and do not replace it with an empty - - 'EmbedExternal': embed any instance of a non local collection (ie external assets) - - - 'Inject': inject components from sub collection instances into the curent object => this is now a seperate custom property that you can apply to a collecion instance - """ - - collection_instances_combine_mode : EnumProperty( - name='Collection instances', - items=( - ('Split', 'Split', 'replace collection instances with an empty + blueprint, creating links to sub blueprints (Default, Recomended)'), - ('Embed', 'Embed', 'treat collection instances as embeded objects and do not replace them with an empty'), - ('EmbedExternal', 'EmbedExternal', 'treat instances of external (not specifified in the current blend file) collections (aka assets etc) as embeded objects and do not replace them with empties'), - #('Inject', 'Inject', 'inject components from sub collection instances into the curent object') - ), - default='Split' - ) - - export_marked_assets: BoolProperty( - name='Auto export marked assets', - description='Collections that have been marked as assets will be systematically exported, even if not in use in another scene', - default=True - ) - - export_separate_dynamic_and_static_objects: BoolProperty( - name='Export dynamic and static objects seperatly', - description="""For MAIN scenes only (aka levels), toggle this to generate 2 files per level: - - one with all dynamic data: collection or instances marked as dynamic/ saveable - - one with all static data: anything else that is NOT marked as dynamic""", - default=False - ) - - export_legacy_mode: BoolProperty( - name='Legacy mode for Bevy', - description='Toggle this if you want to be compatible with bevy_gltf_blueprints/components < 0.8', - default=True - ) - - main_scenes: CollectionProperty(name="main scenes", type=CUSTOM_PG_sceneName) - main_scenes_index: IntProperty(name = "Index for main scenes list", default = 0) - - library_scenes: CollectionProperty(name="library scenes", type=CUSTOM_PG_sceneName) - library_scenes_index: IntProperty(name = "Index for library scenes list", default = 0) - - ##### - export_format: EnumProperty( - name='Format', - items=( - ('GLB', 'glTF Binary (.glb)', - 'Exports a single file, with all data packed in binary form. ' - 'Most efficient and portable, but more difficult to edit later'), - ('GLTF_SEPARATE', 'glTF Separate (.gltf + .bin + textures)', - 'Exports multiple files, with separate JSON, binary and texture data. ' - 'Easiest to edit later') - ), - description=( - 'Output format and embedding options. Binary is most efficient, ' - 'but JSON (embedded or separate) may be easier to edit later' - ), - default='GLB' - ) - export_copyright: StringProperty( - name='Copyright', - description='Legal rights and conditions for the model', - default='' - ) - - export_image_format: EnumProperty( - name='Images', - items=(('AUTO', 'Automatic', - 'Save PNGs as PNGs and JPEGs as JPEGs. ' - 'If neither one, use PNG'), - ('JPEG', 'JPEG Format (.jpg)', - 'Save images as JPEGs. (Images that need alpha are saved as PNGs though.) ' - 'Be aware of a possible loss in quality'), - ('NONE', 'None', - 'Don\'t export images'), - ), - description=( - 'Output format for images. PNG is lossless and generally preferred, but JPEG might be preferable for web ' - 'applications due to the smaller file size. Alternatively they can be omitted if they are not needed' - ), - default='AUTO' - ) - - export_texture_dir: StringProperty( - name='Textures', - description='Folder to place texture files in. Relative to the .gltf file', - default='', - ) - - """ - export_jpeg_quality: IntProperty( - name='JPEG quality', - description='Quality of JPEG export', - default=75, - min=0, - max=100 - ) - """ - - export_keep_originals: BoolProperty( - name='Keep original', - description=('Keep original textures files if possible. ' - 'WARNING: if you use more than one texture, ' - 'where pbr standard requires only one, only one texture will be used. ' - 'This can lead to unexpected results' - ), - default=False, - ) - - export_texcoords: BoolProperty( - name='UVs', - description='Export UVs (texture coordinates) with meshes', - default=True - ) - - export_normals: BoolProperty( - name='Normals', - description='Export vertex normals with meshes', - default=True - ) - - export_draco_mesh_compression_enable: BoolProperty( - name='Draco mesh compression', - description='Compress mesh using Draco', - default=False - ) - - export_draco_mesh_compression_level: IntProperty( - name='Compression level', - description='Compression level (0 = most speed, 6 = most compression, higher values currently not supported)', - default=6, - min=0, - max=10 - ) - - export_draco_position_quantization: IntProperty( - name='Position quantization bits', - description='Quantization bits for position values (0 = no quantization)', - default=14, - min=0, - max=30 - ) - - export_draco_normal_quantization: IntProperty( - name='Normal quantization bits', - description='Quantization bits for normal values (0 = no quantization)', - default=10, - min=0, - max=30 - ) - - export_draco_texcoord_quantization: IntProperty( - name='Texcoord quantization bits', - description='Quantization bits for texture coordinate values (0 = no quantization)', - default=12, - min=0, - max=30 - ) - - export_draco_color_quantization: IntProperty( - name='Color quantization bits', - description='Quantization bits for color values (0 = no quantization)', - default=10, - min=0, - max=30 - ) - - export_draco_generic_quantization: IntProperty( - name='Generic quantization bits', - description='Quantization bits for generic coordinate values like weights or joints (0 = no quantization)', - default=12, - min=0, - max=30 - ) - - export_tangents: BoolProperty( - name='Tangents', - description='Export vertex tangents with meshes', - default=False - ) - - export_materials: EnumProperty( - name='Materials', - items=(('EXPORT', 'Export', - 'Export all materials used by included objects'), - ('PLACEHOLDER', 'Placeholder', - 'Do not export materials, but write multiple primitive groups per mesh, keeping material slot information'), - ('NONE', 'No export', - 'Do not export materials, and combine mesh primitive groups, losing material slot information')), - description='Export materials', - default='EXPORT' - ) - - export_original_specular: BoolProperty( - name='Export original PBR Specular', - description=( - 'Export original glTF PBR Specular, instead of Blender Principled Shader Specular' - ), - default=False, - ) - - export_colors: BoolProperty( - name='Vertex Colors', - description='Export vertex colors with meshes', - default=True - ) - - export_attributes: BoolProperty( - name='Attributes', - description='Export Attributes (when starting with underscore)', - default=False - ) - - use_mesh_edges: BoolProperty( - name='Loose Edges', - description=( - 'Export loose edges as lines, using the material from the first material slot' - ), - default=False, - ) - - use_mesh_vertices: BoolProperty( - name='Loose Points', - description=( - 'Export loose points as glTF points, using the material from the first material slot' - ), - default=False, - ) - - export_cameras: BoolProperty( - name='Cameras', - description='Export cameras', - default=True - ) - - use_selection: BoolProperty( - name='Selected Objects', - description='Export selected objects only', - default=False - ) - - use_visible: BoolProperty( - name='Visible Objects', - description='Export visible objects only', - default=True - ) - - use_renderable: BoolProperty( - name='Renderable Objects', - description='Export renderable objects only', - default=False - ) - - - export_apply: BoolProperty( - name='Export Apply Modifiers', - description='Apply modifiers (excluding Armatures) to mesh objects -' - 'WARNING: prevents exporting shape keys', - default=True - ) - - export_yup: BoolProperty( - name='+Y Up', - description='Export using glTF convention, +Y up', - default=True - ) - - use_visible: BoolProperty( - name='Visible Objects', - description='Export visible objects only', - default=False - ) - - use_renderable: BoolProperty( - name='Renderable Objects', - description='Export renderable objects only', - default=False - ) - - export_extras: BoolProperty( - name='Custom Properties', - description='Export custom properties as glTF extras', - default=True - ) - - export_animations: BoolProperty( - name='Animations', - description='Exports active actions and NLA tracks as glTF animations', - default=False - ) diff --git a/tools/gltf_auto_export/auto_export/tracker.py b/tools/gltf_auto_export/auto_export/tracker.py deleted file mode 100644 index f281106..0000000 --- a/tools/gltf_auto_export/auto_export/tracker.py +++ /dev/null @@ -1,94 +0,0 @@ -import bpy -from bpy.types import (PropertyGroup) -from bpy.props import (PointerProperty) - -from .internals import CollectionsToExport - -class AutoExportTracker(PropertyGroup): - - changed_objects_per_scene = {} - change_detection_enabled = True - export_params_changed = False - - @classmethod - def register(cls): - bpy.types.WindowManager.auto_export_tracker = PointerProperty(type=AutoExportTracker) - # register list of exportable collections - bpy.types.WindowManager.exportedCollections = bpy.props.CollectionProperty(type=CollectionsToExport) - - # setup handlers for updates & saving - #bpy.app.handlers.save_post.append(cls.save_handler) - #bpy.app.handlers.depsgraph_update_post.append(cls.deps_update_handler) - - @classmethod - def unregister(cls): - # remove handlers & co - """try: - bpy.app.handlers.depsgraph_update_post.remove(cls.deps_update_handler) - except:pass - try: - bpy.app.handlers.save_post.remove(cls.save_handler) - except:pass""" - del bpy.types.WindowManager.auto_export_tracker - del bpy.types.WindowManager.exportedCollections - - @classmethod - def save_handler(cls, scene, depsgraph): - print("-------------") - print("saved", bpy.data.filepath) - # auto_export(changes_per_scene, export_parameters_changed) - bpy.ops.export_scenes.auto_gltf(direct_mode= True) - - # (re)set a few things after exporting - # reset wether the gltf export paramters were changed since the last save - cls.export_params_changed = False - # reset whether there have been changed objects since the last save - cls.changed_objects_per_scene.clear() - # all our logic is done, mark this as done - print("EXPORT DONE") - - @classmethod - def deps_update_handler(cls, scene, depsgraph): - # print("change detection enabled", cls.change_detection_enabled) - if scene.name != "temp_scene": - #print("depsgraph_update_post", scene.name) - changed_scene = scene.name or "" - - # only deal with changes if we are no in the mids of saving/exporting - if cls.change_detection_enabled: - #print("-------------") - if not changed_scene in cls.changed_objects_per_scene: - cls.changed_objects_per_scene[changed_scene] = {} - - # depsgraph = bpy.context.evaluated_depsgraph_get() - for obj in depsgraph.updates: - if isinstance(obj.id, bpy.types.Object): - # get the actual object - object = bpy.data.objects[obj.id.name] - # print("changed object", obj.id.name) - cls.changed_objects_per_scene[scene.name][obj.id.name] = object - elif isinstance(obj.id, bpy.types.Material): # or isinstance(obj.id, bpy.types.ShaderNodeTree): - # print("changed material", obj.id, "scene", scene.name,) - material = bpy.data.materials[obj.id.name] - #now find which objects are using the material - for obj in bpy.data.objects: - for slot in obj.material_slots: - if slot.material == material: - cls.changed_objects_per_scene[scene.name][obj.name] = obj - - items = 0 - for scene_name in cls.changed_objects_per_scene: - items += len(cls.changed_objects_per_scene[scene_name].keys()) - if items == 0: - cls.changed_objects_per_scene.clear() - #print("changed_objects_per_scene", cls.changed_objects_per_scene) - else: - cls.changed_objects_per_scene.clear() - - def disable_change_detection(self,): - self.change_detection_enabled = False - self.__class__.change_detection_enabled = False - def enable_change_detection(self): - self.change_detection_enabled = True - self.__class__.change_detection_enabled = True - diff --git a/tools/gltf_auto_export/helpers/generate_and_export.py b/tools/gltf_auto_export/helpers/generate_and_export.py deleted file mode 100644 index d99c610..0000000 --- a/tools/gltf_auto_export/helpers/generate_and_export.py +++ /dev/null @@ -1,58 +0,0 @@ -import bpy -from ..auto_export.export_gltf import export_gltf -from .helpers_collections import (set_active_collection) - -""" -generates a temporary scene, fills it with data, cleans up after itself - * named using temp_scene_name - * filled using the tempScene_filler - * written on disk to gltf_output_path, with the gltf export parameters in export_settings - * cleaned up using tempScene_cleaner - -""" -def generate_and_export(addon_prefs, export_settings, gltf_output_path, temp_scene_name="__temp_scene", tempScene_filler=None, tempScene_cleaner=None): - - temp_scene = bpy.data.scenes.new(name=temp_scene_name) - temp_root_collection = temp_scene.collection - - # save active scene - original_scene = bpy.context.window.scene - # and selected collection - original_collection = bpy.context.view_layer.active_layer_collection - # and mode - original_mode = bpy.context.active_object.mode if bpy.context.active_object != None else None - # we change the mode to object mode, otherwise the gltf exporter is not happy - if original_mode != None and original_mode != 'OBJECT': - print("setting to object mode", original_mode) - bpy.ops.object.mode_set(mode='OBJECT') - # we set our active scene to be this one : this is needed otherwise the stand-in empties get generated in the wrong scene - bpy.context.window.scene = temp_scene - - area = [area for area in bpy.context.screen.areas if area.type == "VIEW_3D"][0] - region = [region for region in area.regions if region.type == 'WINDOW'][0] - with bpy.context.temp_override(scene=temp_scene, area=area, region=region): - # detect scene mistmatch - scene_mismatch = bpy.context.scene.name != bpy.context.window.scene.name - if scene_mismatch: - raise Exception("Context scene mismatch, aborting", bpy.context.scene.name, bpy.context.window.scene.name) - - set_active_collection(bpy.context.scene, temp_root_collection.name) - # generate contents of temporary scene - scene_filler_data = tempScene_filler(temp_root_collection) - # export the temporary scene - try: - export_gltf(gltf_output_path, export_settings) - except Exception as error: - print("failed to export gltf !", error) - raise error - # restore everything - tempScene_cleaner(temp_scene, scene_filler_data) - - # reset active scene - bpy.context.window.scene = original_scene - # reset active collection - bpy.context.view_layer.active_layer_collection = original_collection - # reset mode - if original_mode != None: - bpy.ops.object.mode_set( mode = original_mode ) - diff --git a/tools/gltf_auto_export/helpers/helpers_collections.py b/tools/gltf_auto_export/helpers/helpers_collections.py deleted file mode 100644 index 219add2..0000000 --- a/tools/gltf_auto_export/helpers/helpers_collections.py +++ /dev/null @@ -1,233 +0,0 @@ -import bpy - -# returns the list of the collections in use for a given scene -def get_used_collections(scene): - root_collection = scene.collection - - scene_objects = [o for o in root_collection.all_objects] - collection_names = set() - used_collections = [] - for object in scene_objects: - #print("object ", object) - if object.instance_type == 'COLLECTION': - collection_name = object.instance_collection.name - if not collection_name in collection_names: - collection_names.add(collection_name) - used_collections.append(object.instance_collection) - - #print("scene objects", scene_objects) - return (collection_names, used_collections) - -# gets all collections that should ALWAYS be exported to their respective gltf files, even if they are not used in the main scene/level -def get_marked_collections(scene, addon_prefs): - export_marked_assets = getattr(addon_prefs,"export_marked_assets") - # print("checking library for marked collections") - root_collection = scene.collection - marked_collections = [] - collection_names = [] - for collection in traverse_tree(root_collection): - if 'AutoExport' in collection and collection['AutoExport'] == True: - marked_collections.append(collection) - collection_names.append(collection.name) - # if you have marked collections as assets you can auto export them too - if export_marked_assets and collection.asset_data is not None: - marked_collections.append(collection) - collection_names.append(collection.name) - return (collection_names, marked_collections) - -# gets all collections within collections that might also be relevant -def get_sub_collections(collections, parent=None, children_per_collection=None): - if parent == None: - parent = CollectionNode() - if children_per_collection == None: - children_per_collection = {} - - collection_names = set() - used_collections = [] - - for root_collection in collections: - #print("collections", collections) - node = CollectionNode(name=root_collection.name, parent=parent) - parent.children.append(node) - - #print("root collection", root_collection.name) - for collection in traverse_tree(root_collection): # TODO: filter out COLLECTIONS that have the flatten flag (unlike the flatten flag on colleciton instances themselves) - #print("sub", collection) - node_name = collection.name - children_per_collection[node_name] = [] - #print(" scanning", collection.name) - for object in collection.objects: - #print("FLATTEN", object.name, 'Flatten' in object) - if object.instance_type == 'COLLECTION' : # and not 'Flatten' in object: - collection_name = object.instance_collection.name - #print("sub obj", collection_name) - # FIXME: not sure: - children_per_collection[node_name].append(collection_name) - - (sub_names, sub_collections) = get_sub_collections([object.instance_collection], node, children_per_collection) - if len(list(sub_names)) > 0: - children_per_collection[node_name] += (list(sub_names)) - #print(" found sub collection in use", object.name, object.instance_collection) - - if not collection_name in collection_names: - collection_names.add(collection_name) - used_collections.append(object.instance_collection) - collection_names.update(sub_names) - - #for sub in traverse_tree(root_collection): - return (collection_names, used_collections) - -# FIXME: get rid of this, ugh -def flatten_collection_tree(node, children_per_collection): - children_per_collection[node.name] = [] - for child in node.children: - if not node.name in children_per_collection[node.name]: - children_per_collection[node.name].append(child.name) - flatten_collection_tree(child, children_per_collection) - children_per_collection[node.name] = list(set( children_per_collection[node.name])) - - -class CollectionNode : - def __init__(self, name="", parent=None): - self.name = name - self.children = [] - self.changed = False - self.parent = parent - return - def __str__(self): - children = list(map(lambda child: str(child), self.children)) - return "name: " +self.name + ", children:" + str(children) - -# get exportable collections from lists of mains scenes and lists of library scenes -def get_exportable_collections(main_scenes, library_scenes, addon_prefs): - - all_collections = [] - all_collection_names = [] - root_node = CollectionNode() - root_node.name = "root" - children_per_collection = {} - - - for main_scene in main_scenes: - (collection_names, collections) = get_used_collections(main_scene) - all_collection_names = all_collection_names + list(collection_names) - all_collections = all_collections + collections - for library_scene in library_scenes: - marked_collections = get_marked_collections(library_scene, addon_prefs) - all_collection_names = all_collection_names + marked_collections[0] - all_collections = all_collections + marked_collections[1] - - (collection_names, collections) = get_sub_collections(all_collections, root_node, children_per_collection) - all_collection_names = all_collection_names + list(collection_names) - children_per_collection = {} - flatten_collection_tree(root_node, children_per_collection) - #print("ROOT NODE", children_per_collection) # - - return (all_collection_names, children_per_collection) - -def get_collections_per_scene(collection_names, library_scenes): - collections_per_scene = {} - for scene in library_scenes: - root_collection = scene.collection - for cur_collection in traverse_tree(root_collection): - if cur_collection.name in collection_names: - if not scene.name in collections_per_scene: - collections_per_scene[scene.name] = [] - collections_per_scene[scene.name].append(cur_collection.name) - - return collections_per_scene - -def get_collections_in_library(library_scenes): - """all_collections = [] - all_collection_names = [] - for main_scene in main_scenes: - (collection_names, collections) = get_used_collections(main_scene) - all_collection_names = all_collection_names + list(collection_names) - all_collections = all_collections + collections""" - - # now that we have the collections that are in use by collection instances, check if those collections are actully present in the library scenes - collections = [] - collection_names = [] - for library_scene in library_scenes: - root_collection = library_scene.collection - - for collection in traverse_tree(root_collection): - collections.append(collection) - collection_names.append(collection.name) - return collection_names - - -def get_collection_hierarchy(root_col, levels=1): - """Read hierarchy of the collections in the scene""" - level_lookup = {} - def recurse(root_col, parent, depth): - if depth > levels: - return - if isinstance(parent, bpy.types.Collection): - level_lookup.setdefault(parent, []).append(root_col) - for child in root_col.children: - recurse(child, root_col, depth + 1) - recurse(root_col, root_col.children, 0) - return level_lookup - - - -# traverse all collections -def traverse_tree(t): - yield t - for child in t.children: - yield from traverse_tree(child) - - -# the active collection is a View Layer concept, so you actually have to find the active LayerCollection -# which must be done recursively -def find_layer_collection_recursive(find, col): - # print("root collection", col) - for c in col.children: - # print("child collection", c) - if c.collection == find: - return c - return None - -#Recursivly transverse layer_collection for a particular name -def recurLayerCollection(layerColl, collName): - found = None - if (layerColl.name == collName): - return layerColl - for layer in layerColl.children: - found = recurLayerCollection(layer, collName) - if found: - return found -# traverse the collection hierarchy updward until you find one collection inside target_collections -def find_collection_ascendant_target_collection(collection_parents, target_collections, collection): - if collection == None: - return None - if collection in target_collections: - return collection - if collection in collection_parents: - parent = collection_parents[collection] - else: - return None - return find_collection_ascendant_target_collection(collection_parents, target_collections, parent) - -def set_active_collection(scene, collection_name): - layer_collection = bpy.data.scenes[scene.name].view_layers['ViewLayer'].layer_collection - layerColl = recurLayerCollection(layer_collection, collection_name) - # set active collection to the collection - bpy.context.view_layer.active_layer_collection = layerColl - -# find which of the library scenes the given collection stems from -# TODO: does not seem efficient at all ? -def get_source_scene(collection_name, library_scenes): - match = None - for scene in library_scenes: - root_collection = scene.collection - found = False - for cur_collection in traverse_tree(root_collection): - if cur_collection.name == collection_name: - found = True - break - if found: - match = scene - break - return match diff --git a/tools/gltf_auto_export/helpers/helpers_scenes.py b/tools/gltf_auto_export/helpers/helpers_scenes.py deleted file mode 100644 index 55009c9..0000000 --- a/tools/gltf_auto_export/helpers/helpers_scenes.py +++ /dev/null @@ -1,205 +0,0 @@ -import json -import bpy -from .helpers_collections import (CollectionNode, get_sub_collections, get_used_collections, set_active_collection) -from .object_makers import (make_empty) - - -# these are mostly for when using this add-on together with the bevy_components add-on -custom_properties_to_filter_out = ['_combine', 'template', 'components_meta'] - -def is_component_valid(object, component_name): - if "components_meta" in object: - target_components_metadata = object.components_meta.components - component_meta = next(filter(lambda component: component["name"] == component_name, target_components_metadata), None) - if component_meta != None: - return component_meta.enabled and not component_meta.invalid - return True - -def remove_unwanted_custom_properties(object): - to_remove = [] - for component_name in object.keys(): - if not is_component_valid(object, component_name): - to_remove.append(component_name) - - for cp in custom_properties_to_filter_out + to_remove: - if cp in object: - del object[cp] - -def duplicate_object(object): - obj_copy = object.copy() - if object.data: - data = object.data.copy() - obj_copy.data = data - if object.animation_data and object.animation_data.action: - obj_copy.animation_data.action = object.animation_data.action.copy() - return obj_copy - -#also removes unwanted custom_properties for all objects in hiearchy -def duplicate_object_recursive(object, parent, collection): - original_name = object.name - object.name = original_name + "____bak" - copy = duplicate_object(object) - copy.name = original_name - collection.objects.link(copy) - - remove_unwanted_custom_properties(copy) - - if parent: - copy.parent = parent - - for child in object.children: - duplicate_object_recursive(child, copy, collection) - return copy - - -# copies the contents of a collection into another one while replacing library instances with empties -def copy_hollowed_collection_into(source_collection, destination_collection, parent_empty=None, filter=None, library_collections=[], addon_prefs={}): - collection_instances_combine_mode = getattr(addon_prefs, "collection_instances_combine_mode") - legacy_mode = getattr(addon_prefs, "export_legacy_mode") - collection_instances_combine_mode= collection_instances_combine_mode - for object in source_collection.objects: - if filter is not None and filter(object) is False: - continue - #check if a specific collection instance does not have an ovveride for combine_mode - combine_mode = object['_combine'] if '_combine' in object else collection_instances_combine_mode - - if object.instance_type == 'COLLECTION' and (combine_mode == 'Split' or (combine_mode == 'EmbedExternal' and (object.instance_collection.name in library_collections)) ): - #print("creating empty for", object.name, object.instance_collection.name, library_collections, combine_mode) - collection_name = object.instance_collection.name - original_name = object.name - - object.name = original_name + "____bak" - empty_obj = make_empty(original_name, object.location, object.rotation_euler, object.scale, destination_collection) - """we inject the collection/blueprint name, as a component called 'BlueprintName', but we only do this in the empty, not the original object""" - empty_obj['BlueprintName'] = '"'+collection_name+'"' if legacy_mode else '("'+collection_name+'")' - empty_obj['SpawnHere'] = '()' - - # we also inject a list of all sub blueprints, so that the bevy side can preload them - if not legacy_mode: - root_node = CollectionNode() - root_node.name = "root" - children_per_collection = {} - print("collection stuff", original_name) - get_sub_collections([object.instance_collection], root_node, children_per_collection) - empty_obj["BlueprintsList"] = f"({json.dumps(dict(children_per_collection))})" - #empty_obj["Assets"] = {"Animations": [], "Materials": [], "Models":[], "Textures":[], "Audio":[], "Other":[]} - - - # we copy custom properties over from our original object to our empty - for component_name, component_value in object.items(): - if component_name not in custom_properties_to_filter_out and is_component_valid(object, component_name): #copy only valid properties - empty_obj[component_name] = component_value - if parent_empty is not None: - empty_obj.parent = parent_empty - else: - - # we create a copy of our object and its children, to leave the original one as it is - if object.parent == None: - copy = duplicate_object_recursive(object, None, destination_collection) - - if parent_empty is not None: - copy.parent = parent_empty - - # for every sub-collection of the source, copy its content into a new sub-collection of the destination - for collection in source_collection.children: - original_name = collection.name - collection.name = original_name + "____bak" - collection_placeholder = make_empty(original_name, [0,0,0], [0,0,0], [1,1,1], destination_collection) - - if parent_empty is not None: - collection_placeholder.parent = parent_empty - - copy_hollowed_collection_into( - source_collection = collection, - destination_collection = destination_collection, - parent_empty = collection_placeholder, - filter = filter, - library_collections = library_collections, - addon_prefs=addon_prefs - ) - - return {} - -# clear & remove "hollow scene" -def clear_hollow_scene(temp_scene, original_root_collection): - def restore_original_names(collection): - if collection.name.endswith("____bak"): - collection.name = collection.name.replace("____bak", "") - for object in collection.objects: - if object.instance_type == 'COLLECTION': - if object.name.endswith("____bak"): - object.name = object.name.replace("____bak", "") - else: - if object.name.endswith("____bak"): - object.name = object.name.replace("____bak", "") - for child_collection in collection.children: - restore_original_names(child_collection) - - # reset original names - restore_original_names(original_root_collection) - - # remove empties (only needed when we go via ops ????) - temp_root_collection = temp_scene.collection - temp_scene_objects = [o for o in temp_root_collection.objects] - for object in temp_scene_objects: - bpy.data.objects.remove(object, do_unlink=True) - # remove the temporary scene - bpy.data.scenes.remove(temp_scene) - - -# convenience utility to get lists of scenes -def get_scenes(addon_prefs): - level_scene_names= list(map(lambda scene: scene.name, getattr(addon_prefs,"main_scenes"))) # getattr(addon_prefs, "main_scene_names_compact").split(',')# - library_scene_names = list(map(lambda scene: scene.name, getattr(addon_prefs,"library_scenes"))) #getattr(addon_prefs, "main_scene_names_compact").split(',')# - - level_scene_names = list(filter(lambda name: name in bpy.data.scenes, level_scene_names)) - library_scene_names = list(filter(lambda name: name in bpy.data.scenes, library_scene_names)) - - level_scenes = list(map(lambda name: bpy.data.scenes[name], level_scene_names)) - library_scenes = list(map(lambda name: bpy.data.scenes[name], library_scene_names)) - - return [level_scene_names, level_scenes, library_scene_names, library_scenes] - - - - -def inject_blueprints_list_into_main_scene(scene): - print("injecting assets/blueprints data into scene") - root_collection = scene.collection - assets_list = None - assets_list_name = f"assets_list_{scene.name}_components" - for object in scene.objects: - if object.name == assets_list_name: - assets_list = object - break - - if assets_list is None: - assets_list = make_empty(assets_list_name, [0,0,0], [0,0,0], [0,0,0], root_collection) - - # find all blueprints used in a scene - # TODO: export a tree rather than a flat list ? because you could have potential clashing items in flat lists (amongst other issues) - (collection_names, collections) = get_used_collections(scene) - root_node = CollectionNode() - root_node.name = "root" - children_per_collection = {} - - #print("collection_names", collection_names, "collections", collections) - get_sub_collections(collections, root_node, children_per_collection) - # what about marked assets ? - # what about audio assets ? - # what about materials ? - # object['MaterialInfo'] = '(name: "'+material.name+'", source: "'+current_project_name + '")' - - #assets_list["blueprints_direct"] = list(collection_names) - assets_list["BlueprintsList"] = f"({json.dumps(dict(children_per_collection))})" - #assets_list["Materials"]= '()' - -def remove_blueprints_list_from_main_scene(scene): - assets_list = None - assets_list_name = f"assets_list_{scene.name}_components" - - for object in scene.objects: - if object.name == assets_list_name: - assets_list = object - if assets_list is not None: - bpy.data.objects.remove(assets_list, do_unlink=True) diff --git a/tools/gltf_auto_export/helpers/to_remove_later.py b/tools/gltf_auto_export/helpers/to_remove_later.py deleted file mode 100644 index 595bc93..0000000 --- a/tools/gltf_auto_export/helpers/to_remove_later.py +++ /dev/null @@ -1,242 +0,0 @@ -bl_info = { - "name": "gltf_auto_export", - "author": "kaosigh", - "version": (0, 10, 0), - "blender": (3, 4, 0), - "location": "File > Import-Export", - "description": "glTF/glb auto-export", - "warning": "", - "wiki_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow", - "tracker_url": "https://github.com/kaosat-dev/Blender_bevy_components_workflow/issues/new", - "category": "Import-Export" -} - -import bpy -from bpy.props import (BoolProperty, - IntProperty, - StringProperty, - EnumProperty, - CollectionProperty - ) - - -# glTF extensions are named following a convention with known prefixes. -# See: https://github.com/KhronosGroup/glTF/tree/main/extensions#about-gltf-extensions -# also: https://github.com/KhronosGroup/glTF/blob/main/extensions/Prefixes.md -glTF_extension_name = "EXT_auto_export" - -# Support for an extension is "required" if a typical glTF viewer cannot be expected -# to load a given model without understanding the contents of the extension. -# For example, a compression scheme or new image format (with no fallback included) -# would be "required", but physics metadata or app-specific settings could be optional. -extension_is_required = False - -class ExampleExtensionProperties(bpy.types.PropertyGroup): - enabled: bpy.props.BoolProperty( - name=bl_info["name"], - description='Include this extension in the exported glTF file.', - default=True - ) - - auto_export_main_scene_name: StringProperty( - name='Main scene', - description='The name of the main scene/level/world to auto export', - default='Scene' - ) - auto_export_output_folder: StringProperty( - name='Export folder (relative)', - description='The root folder for all exports(relative to current file) Defaults to current folder', - default='' - ) - auto_export_library_scene_name: StringProperty( - name='Library scene', - description='The name of the library scene to auto export', - default='Library' - ) - # scene components - auto_export_scene_settings: BoolProperty( - name='Export scene settings', - description='Export scene settings ie AmbientLighting, Bloom, AO etc', - default=False - ) - - # blueprint settings - auto_export_blueprints: BoolProperty( - name='Export Blueprints', - description='Replaces collection instances with an Empty with a BlueprintName custom property', - default=True - ) - auto_export_blueprints_path: StringProperty( - name='Blueprints path', - description='path to export the blueprints to (relative to the Export folder)', - default='library' - ) - - auto_export_materials_library: BoolProperty( - name='Export materials library', - description='remove materials from blueprints and use the material library instead', - default=False - ) - auto_export_materials_path: StringProperty( - name='Materials path', - description='path to export the materials libraries to (relative to the root folder)', - default='materials' - ) - -def register(): - bpy.utils.register_class(ExampleExtensionProperties) - bpy.types.Scene.ExampleExtensionProperties = bpy.props.PointerProperty(type=ExampleExtensionProperties) - -def register_panel(): - # Register the panel on demand, we need to be sure to only register it once - # This is necessary because the panel is a child of the extensions panel, - # which may not be registered when we try to register this extension - try: - bpy.utils.register_class(GLTF_PT_UserExtensionPanel) - except Exception: - pass - - # If the glTF exporter is disabled, we need to unregister the extension panel - # Just return a function to the exporter so it can unregister the panel - return unregister_panel - - -def unregister_panel(): - # Since panel is registered on demand, it is possible it is not registered - try: - bpy.utils.unregister_class(GLTF_PT_UserExtensionPanel) - except Exception: - pass - - -def unregister(): - unregister_panel() - bpy.utils.unregister_class(ExampleExtensionProperties) - del bpy.types.Scene.ExampleExtensionProperties - -class GLTF_PT_UserExtensionPanel(bpy.types.Panel): - - bl_space_type = 'FILE_BROWSER' - bl_region_type = 'TOOL_PROPS' - bl_label = "Enabled" - bl_parent_id = "GLTF_PT_export_user_extensions" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - sfile = context.space_data - operator = sfile.active_operator - return operator.bl_idname == "EXPORT_SCENE_OT_gltf" - - def draw_header(self, context): - props = bpy.context.scene.ExampleExtensionProperties - self.layout.prop(props, 'enabled') - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False # No animation. - - props = bpy.context.scene.ExampleExtensionProperties - layout.active = props.enabled - - props = bpy.context.scene.ExampleExtensionProperties - for bla in props.__annotations__: - layout.prop(props, bla) - - -class glTF2ExportUserExtension: - - def __init__(self): - # We need to wait until we create the gltf2UserExtension to import the gltf2 modules - # Otherwise, it may fail because the gltf2 may not be loaded yet - from io_scene_gltf2.io.com.gltf2_io_extensions import Extension - self.Extension = Extension - self.properties = bpy.context.scene.ExampleExtensionProperties - - def gather_node_hook(self, gltf2_object, blender_object, export_settings): - if self.properties.enabled: - if gltf2_object.extensions is None: - gltf2_object.extensions = {} - print("bla bla") - gltf2_object.extensions[glTF_extension_name] = self.Extension( - name=glTF_extension_name, - extension={"auto_export_blueprints": self.properties.auto_export_blueprints}, - required=extension_is_required - ) - - -def did_export_parameters_change(current_params, previous_params): - set1 = set(previous_params.items()) - set2 = set(current_params.items()) - difference = dict(set1 ^ set2) - - changed_param_names = list(set(difference.keys())- set(AutoExportGltfPreferenceNames)) - changed_parameters = len(changed_param_names) > 0 - return changed_parameters - -# original in export_blueprints => export_collections - # The part below is not necessary NORMALLY , but blender crashes in the "normal" case when using bpy.context.temp_override, - #if relevant we replace sub collections instances with placeholders too - # this is not needed if a collection/blueprint does not have sub blueprints or sub collections - collection_in_blueprint_hierarchy = collection_name in blueprint_hierarchy and len(blueprint_hierarchy[collection_name]) > 0 - collection_has_child_collections = len(bpy.data.collections[collection_name].children) > 0 - #if collection_in_blueprint_hierarchy or collection_has_child_collections: - - - - """else: - print("standard export") - # set active scene to be the library scene - original_scene = bpy.context.window.scene - bpy.context.window.scene = library_scene - with bpy.context.temp_override(scene=library_scene): - print("active scene", bpy.context.scene) - export_gltf(gltf_output_path, export_settings) - bpy.context.window.scene = original_scene""" - -""" - blueprint_template = object['Template'] if 'Template' in object else False - if blueprint_template and parent_empty is None: # ONLY WORKS AT ROOT LEVEL - print("BLUEPRINT TEMPLATE", blueprint_template, destination_collection, parent_empty) - for object in source_collection.objects: - if object.type == 'EMPTY' and object.name.endswith("components"): - original_collection = bpy.data.collections[collection_name] - components_holder = object - print("WE CAN INJECT into", object, "data from", original_collection) - - # now we look for components inside the collection - components = {} - for object in original_collection.objects: - if object.type == 'EMPTY' and object.name.endswith("components"): - for component_name in object.keys(): - if component_name not in '_RNA_UI': - print( component_name , "-" , object[component_name] ) - components[component_name] = object[component_name] - - # copy template components into target object - for key in components: - print("copying ", key,"to", components_holder) - if not key in components_holder: - components_holder[key] = components[key] - """ - -# potentially useful alternative -def duplicate_object2(object, original_name): - print("copy object", object) - - with bpy.context.temp_override(object=object, active_object = object): - bpy.ops.object.duplicate(linked=False) - new_obj = bpy.context.active_object - - print("new obj", new_obj, "bpy.context.view_layer", bpy.context.view_layer.objects) - for obj in bpy.context.view_layer.objects: - print("obj", obj) - bpy.context.view_layer.update() - new_obj.name = original_name - - if object.animation_data: - print("OJECT ANIMATION") - new_obj.animation_data.action = object.animation_data.action.copy() - - return new_obj \ No newline at end of file diff --git a/tools/gltf_auto_export/modules/bevy_scene_components.py b/tools/gltf_auto_export/modules/bevy_scene_components.py deleted file mode 100644 index ce2d29b..0000000 --- a/tools/gltf_auto_export/modules/bevy_scene_components.py +++ /dev/null @@ -1,64 +0,0 @@ - -from ..helpers.object_makers import make_empty - -def upsert_scene_components(scene, world, main_scene_names): - #should only be run in one of the main scenes - if scene.name not in main_scene_names: - return - root_collection = scene.collection - lighting_components = None - print("upsert scene components", scene.name, scene.objects) - for object in scene.objects: - if object.name == "lighting_components_"+scene.name: - lighting_components = object - break - - if lighting_components is None: - lighting_components = make_empty('lighting_components_'+scene.name, [0,0,0], [0,0,0], [0,0,0], root_collection) - - if world is not None: - lighting_components['BlenderBackgroundShader'] = ambient_color_to_component(world) - - lighting_components['BlenderShadowSettings'] = scene_shadows_to_component(scene) - - - if scene.eevee.use_bloom: - lighting_components['BloomSettings'] = scene_bloom_to_component(scene) - elif 'BloomSettings' in lighting_components: - del lighting_components['BloomSettings'] - - if scene.eevee.use_gtao: - lighting_components['SSAOSettings'] = scene_ao_to_component(scene) - elif 'SSAOSettings' in lighting_components: - del lighting_components['SSAOSettings'] - - -def ambient_color_to_component(world): - color = None - strength = None - try: - color = world.node_tree.nodes['Background'].inputs[0].default_value - strength = world.node_tree.nodes['Background'].inputs[1].default_value - except Exception as ex: - print("failed to parse ambient color: Only background is supported") - - - if color is not None and strength is not None: - colorRgba = f"LinearRgba((red: {color[0]}, green: {color[1]}, blue: {color[2]}, alpha: {color[3]}))" - component = f"( color: {colorRgba}, strength: {strength})" - return component - return None - -def scene_shadows_to_component(scene): - cascade_size = scene.eevee.shadow_cascade_size - component = f"(cascade_size: {cascade_size})" - return component - -def scene_bloom_to_component(scene): - component = f"BloomSettings(intensity: {scene.eevee.bloom_intensity})" - return component - -def scene_ao_to_component(scene): - ssao = scene.eevee.use_gtao - component= "SSAOSettings()" - return component \ No newline at end of file diff --git a/tools/gltf_auto_export/tests/test_bevy_integration.py b/tools/gltf_auto_export/tests/test_bevy_integration.py deleted file mode 100644 index e45114c..0000000 --- a/tools/gltf_auto_export/tests/test_bevy_integration.py +++ /dev/null @@ -1,125 +0,0 @@ -import bpy -import os -import subprocess -import json -import pytest -import shutil - -from PIL import Image -from pixelmatch.contrib.PIL import pixelmatch - -@pytest.fixture -def setup_data(request): - print("\nSetting up resources...") - - def finalizer(): - root_path = "../../testing/bevy_example" - assets_root_path = os.path.join(root_path, "assets") - models_path = os.path.join(assets_root_path, "models") - materials_path = os.path.join(assets_root_path, "materials") - #other_materials_path = os.path.join("../../testing", "other_materials") - - print("\nPerforming teardown...") - if os.path.exists(models_path): - shutil.rmtree(models_path) - - if os.path.exists(materials_path): - shutil.rmtree(materials_path) - - diagnostics_file_path = os.path.join(root_path, "bevy_diagnostics.json") - if os.path.exists(diagnostics_file_path): - os.remove(diagnostics_file_path) - - screenshot_observed_path = os.path.join(root_path, "screenshot.png") - if os.path.exists(screenshot_observed_path): - os.remove(screenshot_observed_path) - - request.addfinalizer(finalizer) - - return None - - -""" -- removes existing gltf files if needed -- calls exporter on the testing scene -- launches bevy app & checks for output -- if all worked => test is a-ok -""" -def test_export_complex(setup_data): - root_path = "../../testing/bevy_example" - assets_root_path = os.path.join(root_path, "assets") - models_path = os.path.join(assets_root_path, "models") - auto_export_operator = bpy.ops.export_scenes.auto_gltf - - # with change detection - # first, configure things - # we use the global settings for that - export_props = { - "main_scene_names" : ['World'], - "library_scene_names": ['Library'] - } - stored_settings = bpy.data.texts[".gltf_auto_export_settings"] if ".gltf_auto_export_settings" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings") - stored_settings.clear() - stored_settings.write(json.dumps(export_props)) - - # move the main cube - bpy.data.objects["Cube"].location = [1, 0, 0] - # move the cube in the library - bpy.data.objects["Blueprint1_mesh"].location = [1, 2, 1] - - auto_export_operator( - direct_mode=True, - export_output_folder="./models", - export_scene_settings=True, - export_blueprints=True, - export_legacy_mode=False, - export_animations=True, - export_materials_library=True - ) - # blueprint1 => has an instance, got changed, should export - # blueprint2 => has NO instance, but marked as asset, should export - # blueprint3 => has NO instance, not marked as asset, used inside blueprint 4: should export - # blueprint4 => has an instance, with nested blueprint3, should export - # blueprint5 => has NO instance, not marked as asset, should NOT export - - assert os.path.exists(os.path.join(models_path, "World.glb")) == True - assert os.path.exists(os.path.join(models_path, "library", "Blueprint1.glb")) == True - assert os.path.exists(os.path.join(models_path, "library", "Blueprint2.glb")) == True - assert os.path.exists(os.path.join(models_path, "library", "Blueprint3.glb")) == True - assert os.path.exists(os.path.join(models_path, "library", "Blueprint4_nested.glb")) == True - assert os.path.exists(os.path.join(models_path, "library", "Blueprint5.glb")) == False - assert os.path.exists(os.path.join(models_path, "library", "Blueprint6_animated.glb")) == True - assert os.path.exists(os.path.join(models_path, "library", "Blueprint7_hierarchy.glb")) == True - - # 'assets_list_'+scene.name+"_components" should have been removed after the export - assets_list_object_name = "assets_list_"+"World"+"_components" - assets_list_object_present = assets_list_object_name in bpy.data.objects - assert assets_list_object_present == False - - # now run bevy - command = "cargo run --features bevy/dynamic_linking" - FNULL = open(os.devnull, 'w') #use this if you want to suppress output to stdout from the subprocess - return_code = subprocess.call(["cargo", "run", "--features", "bevy/dynamic_linking"], cwd=root_path) - print("RETURN CODE OF BEVY APP", return_code) - assert return_code == 0 - - with open(os.path.join(root_path, "bevy_diagnostics.json")) as diagnostics_file: - diagnostics = json.load(diagnostics_file) - print("diagnostics", diagnostics) - assert diagnostics["animations"] == True - assert diagnostics["cylinder_found"] == True - assert diagnostics["empty_found"] == True - assert diagnostics["blueprints_list_found"] == True - - # last but not least, do a visual compare - screenshot_expected_path = os.path.join(root_path, "expected_screenshot.png") - screenshot_observed_path = os.path.join(root_path, "screenshot.png") - img_a = Image.open(screenshot_expected_path) - img_b = Image.open(screenshot_observed_path) - img_diff = Image.new("RGBA", img_a.size) - mismatch = pixelmatch(img_a, img_b, img_diff, includeAA=True) - print("image mismatch", mismatch) - assert mismatch < 50 - - - diff --git a/tools/gltf_auto_export/ui/main.py b/tools/gltf_auto_export/ui/main.py deleted file mode 100644 index 0e7edb9..0000000 --- a/tools/gltf_auto_export/ui/main.py +++ /dev/null @@ -1,262 +0,0 @@ -import bpy -from bpy.types import Operator -from bpy_extras.io_utils import ExportHelper -from bpy.props import (BoolProperty, - IntProperty, - StringProperty, - EnumProperty, - CollectionProperty - ) - -from ..auto_export import auto_export - -from ..auto_export.preferences import (AutoExportGltfAddonPreferences, AutoExportGltfPreferenceNames) -from ..helpers.helpers_scenes import (get_scenes) -from ..helpers.helpers_collections import (get_exportable_collections) -###################################################### -## ui logic & co - -class GLTF_PT_auto_export_main(bpy.types.Panel): - bl_space_type = 'FILE_BROWSER' - bl_region_type = 'TOOL_PROPS' - bl_label = "" - bl_parent_id = "FILE_PT_operator" - bl_options = {'HIDE_HEADER'} - - @classmethod - def poll(cls, context): - sfile = context.space_data - operator = sfile.active_operator - - return operator.bl_idname == "EXPORT_SCENES_OT_auto_gltf" - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False # No animation. - - sfile = context.space_data - -class GLTF_PT_auto_export_root(bpy.types.Panel): - bl_space_type = 'FILE_BROWSER' - bl_region_type = 'TOOL_PROPS' - bl_label = "Auto export" - bl_parent_id = "GLTF_PT_auto_export_main" - #bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - sfile = context.space_data - operator = sfile.active_operator - return operator.bl_idname == "EXPORT_SCENES_OT_auto_gltf" - - def draw_header(self, context): - sfile = context.space_data - operator = sfile.active_operator - self.layout.prop(operator, "auto_export", text="") - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False # No animation. - - sfile = context.space_data - operator = sfile.active_operator - - layout.active = operator.auto_export - layout.prop(operator, 'will_save_settings') - layout.prop(operator, "export_change_detection") - layout.prop(operator, "export_output_folder") - layout.prop(operator, "export_scene_settings") - layout.prop(operator, "export_legacy_mode") - - # scene selectors - row = layout.row() - col = row.column(align=True) - col.separator() - - source = operator - - rows = 2 - - # main/level scenes - layout.label(text="main scenes") - layout.prop(context.window_manager, "main_scene", text='') - - row = layout.row() - row.template_list("SCENE_UL_GLTF_auto_export", "level scenes", source, "main_scenes", source, "main_scenes_index", rows=rows) - - col = row.column(align=True) - sub_row = col.row() - add_operator = sub_row.operator("scene_list.list_action", icon='ADD', text="") - add_operator.action = 'ADD' - add_operator.scene_type = 'level' - #add_operator.source = operator - sub_row.enabled = context.window_manager.main_scene is not None - - sub_row = col.row() - remove_operator = sub_row.operator("scene_list.list_action", icon='REMOVE', text="") - remove_operator.action = 'REMOVE' - remove_operator.scene_type = 'level' - col.separator() - - #up_operator = col.operator("scene_list.list_action", icon='TRIA_UP', text="") - #up_operator.action = 'UP' - #col.operator("scene_list.list_action", icon='TRIA_DOWN', text="").action = 'DOWN' - - # library scenes - layout.label(text="library scenes") - layout.prop(context.window_manager, "library_scene", text='') - - row = layout.row() - row.template_list("SCENE_UL_GLTF_auto_export", "library scenes", source, "library_scenes", source, "library_scenes_index", rows=rows) - - col = row.column(align=True) - sub_row = col.row() - add_operator = sub_row.operator("scene_list.list_action", icon='ADD', text="") - add_operator.action = 'ADD' - add_operator.scene_type = 'library' - sub_row.enabled = context.window_manager.library_scene is not None - - - sub_row = col.row() - remove_operator = sub_row.operator("scene_list.list_action", icon='REMOVE', text="") - remove_operator.action = 'REMOVE' - remove_operator.scene_type = 'library' - col.separator() - -class GLTF_PT_auto_export_blueprints(bpy.types.Panel): - bl_space_type = 'FILE_BROWSER' - bl_region_type = 'TOOL_PROPS' - bl_label = "Blueprints" - bl_parent_id = "GLTF_PT_auto_export_root" - - @classmethod - def poll(cls, context): - sfile = context.space_data - operator = sfile.active_operator - - return operator.bl_idname == "EXPORT_SCENES_OT_auto_gltf" #"EXPORT_SCENE_OT_gltf" - - - def draw_header(self, context): - layout = self.layout - sfile = context.space_data - operator = sfile.active_operator - layout.prop(operator, "export_blueprints", text="") - - #self.layout.prop(operator, "auto_export", text="") - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False # No animation. - - sfile = context.space_data - operator = sfile.active_operator - - layout.active = operator.export_blueprints - - # collections/blueprints - layout.prop(operator, "export_blueprints_path") - layout.prop(operator, "collection_instances_combine_mode") - layout.prop(operator, "export_marked_assets") - layout.prop(operator, "export_separate_dynamic_and_static_objects") - layout.separator() - # materials - layout.prop(operator, "export_materials_library") - layout.prop(operator, "export_materials_path") - - -class GLTF_PT_auto_export_collections_list(bpy.types.Panel): - bl_space_type = 'FILE_BROWSER' - bl_region_type = 'TOOL_PROPS' - bl_label = "Blueprints: Exported Collections" - bl_parent_id = "GLTF_PT_auto_export_blueprints" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - sfile = context.space_data - operator = sfile.active_operator - - return operator.bl_idname == "EXPORT_SCENES_OT_auto_gltf" #"EXPORT_SCENE_OT_gltf" - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False # No animation. - - sfile = context.space_data - operator = sfile.active_operator - - for collection in bpy.context.window_manager.exportedCollections: - row = layout.row() - row.label(text=collection.name) - -class GLTF_PT_auto_export_gltf(bpy.types.Panel): - bl_space_type = 'FILE_BROWSER' - bl_region_type = 'TOOL_PROPS' - bl_label = "Gltf" - bl_parent_id = "GLTF_PT_auto_export_main" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - sfile = context.space_data - operator = sfile.active_operator - - return operator.bl_idname == "EXPORT_SCENES_OT_auto_gltf" #"EXPORT_SCENE_OT_gltf" - - def draw(self, context): - preferences = context.preferences - layout = self.layout - - sfile = context.space_data - operator = sfile.active_operator - - addon_prefs = operator - - # we get the addon preferences from the standard gltf exporter & use those : - addon_prefs_gltf = preferences.addons["io_scene_gltf2"].preferences - - #self.layout.operator("EXPORT_SCENE_OT_gltf", text='glTF 2.0 (.glb/.gltf)') - #bpy.ops.export_scene.gltf - - for key in addon_prefs.__annotations__.keys(): - if key not in AutoExportGltfPreferenceNames: - layout.prop(operator, key) - -class SCENE_UL_GLTF_auto_export(bpy.types.UIList): - # The draw_item function is called for each item of the collection that is visible in the list. - # data is the RNA object containing the collection, - # item is the current drawn item of the collection, - # icon is the "computed" icon for the item (as an integer, because some objects like materials or textures - # have custom icons ID, which are not available as enum items). - # active_data is the RNA object containing the active property for the collection (i.e. integer pointing to the - # active item of the collection). - # active_propname is the name of the active property (use 'getattr(active_data, active_propname)'). - # index is index of the current item in the collection. - # flt_flag is the result of the filtering process for this item. - # Note: as index and flt_flag are optional arguments, you do not have to use/declare them here if you don't - # need them. - def draw_item(self, context, layout, data, item, icon, active_data, active_propname): - ob = data - # draw_item must handle the three layout types... Usually 'DEFAULT' and 'COMPACT' can share the same code. - if self.layout_type in {'DEFAULT', 'COMPACT'}: - # You should always start your row layout by a label (icon + text), or a non-embossed text field, - # this will also make the row easily selectable in the list! The later also enables ctrl-click rename. - # We use icon_value of label, as our given icon is an integer value, not an enum ID. - # Note "data" names should never be translated! - #if ma: - # layout.prop(ma, "name", text="", emboss=False, icon_value=icon) - #else: - # layout.label(text="", translate=False, icon_value=icon) - layout.label(text=item.name, icon_value=icon) - #layout.prop(item, "name", text="", emboss=False, icon_value=icon) - # 'GRID' layout type should be as compact as possible (typically a single icon!). - elif self.layout_type == 'GRID': - layout.alignment = 'CENTER' - layout.label(text="", icon_value=icon) - - diff --git a/tools/gltf_auto_export/ui/operators.py b/tools/gltf_auto_export/ui/operators.py deleted file mode 100644 index 31ea51d..0000000 --- a/tools/gltf_auto_export/ui/operators.py +++ /dev/null @@ -1,83 +0,0 @@ - -import bpy -from bpy.types import Operator - -class SCENES_LIST_OT_actions(Operator): - """Move items up and down, add and remove""" - bl_idname = "scene_list.list_action" - bl_label = "List Actions" - bl_description = "Move items up and down, add and remove" - bl_options = {'REGISTER'} - - action: bpy.props.EnumProperty( - items=( - ('UP', "Up", ""), - ('DOWN', "Down", ""), - ('REMOVE', "Remove", ""), - ('ADD', "Add", ""))) - - - scene_type: bpy.props.StringProperty()#TODO: replace with enum - - def invoke(self, context, event): - source = context.space_data.active_operator - target_name = "library_scenes" - target_index = "library_scenes_index" - if self.scene_type == "level": - target_name = "main_scenes" - target_index = "main_scenes_index" - - target = getattr(source, target_name) - idx = getattr(source, target_index) - current_index = getattr(source, target_index) - - try: - item = target[idx] - except IndexError: - pass - else: - if self.action == 'DOWN' and idx < len(target) - 1: - target.move(idx, idx + 1) - setattr(source, target_index, current_index +1 ) - info = 'Item "%s" moved to position %d' % (item.name, current_index + 1) - self.report({'INFO'}, info) - - elif self.action == 'UP' and idx >= 1: - target.move(idx, idx - 1) - setattr(source, target_index, current_index -1 ) - info = 'Item "%s" moved to position %d' % (item.name, current_index + 1) - self.report({'INFO'}, info) - - elif self.action == 'REMOVE': - info = 'Item "%s" removed from list' % (target[idx].name) - setattr(source, target_index, current_index -1 ) - target.remove(idx) - self.report({'INFO'}, info) - - if self.action == 'ADD': - new_scene_name = None - if self.scene_type == "level": - if context.window_manager.main_scene: - new_scene_name = context.window_manager.main_scene.name - else: - if context.window_manager.library_scene: - new_scene_name = context.window_manager.library_scene.name - if new_scene_name: - item = target.add() - item.name = new_scene_name#f"Rule {idx +1}" - - if self.scene_type == "level": - context.window_manager.main_scene = None - else: - context.window_manager.library_scene = None - - #name = f"Rule {idx +1}" - #target.append({"name": name}) - setattr(source, target_index, len(target) - 1) - #source[target_index] = len(target) - 1 - info = '"%s" added to list' % (item.name) - self.report({'INFO'}, info) - - return {"FINISHED"} - - diff --git a/tools/internal_generate_release_zips.py b/tools/internal_generate_release_zips.py index f14f6a4..807de8c 100644 --- a/tools/internal_generate_release_zips.py +++ b/tools/internal_generate_release_zips.py @@ -21,8 +21,6 @@ def zipdir(path, ziph): os.path.relpath(os.path.join(root, file), os.path.join(path, '..'))) -with zipfile.ZipFile("bevy_components.zip", mode="w", compression=zipfile.ZIP_DEFLATED) as archive: - zipdir('./bevy_components', archive) +with zipfile.ZipFile("blenvy.zip", mode="w", compression=zipfile.ZIP_DEFLATED) as archive: + zipdir('./blenvy', archive) -with zipfile.ZipFile("gltf_auto_export.zip", mode="w", compression=zipfile.ZIP_DEFLATED) as archive: - zipdir('./gltf_auto_export', archive) \ No newline at end of file