Commit Graph

101 Commits

Author SHA1 Message Date
kaosat.dev
6664e11ff0 chore(testing): added example of "empty" nested inside a collection to the testing blend file 2024-03-04 13:13:56 +01:00
kaosat.dev
3c4bc26830 chore(tools): more work on auto gltf generation for examples 2024-03-04 13:13:32 +01:00
kaosat.dev
6c8593f82d feat(tools): added boilerplate for internal tools
* clean zip file generator for blender add-on releases
 * wip for example gltf file generator
2024-03-04 13:00:36 +01:00
kaosat.dev
641f84e1bf chore(examples): updated example glbs 2024-03-04 13:00:09 +01:00
kaosat.dev
92e02ee5f9 chore(testing): updated expected screenshot 2024-03-04 11:22:39 +01:00
kaosat.dev
6378aa9706 Merge branch 'janhohenheim-light-processing' into bevy_main 2024-03-04 11:13:25 +01:00
kaosat.dev
5c60e45839 Merge branch 'light-processing' of github.com:janhohenheim/Blender_bevy_components_workflow into janhohenheim-light-processing 2024-03-04 11:12:43 +01:00
kaosat.dev
a80bb1e9a1 chore(examples): fixed camera ordering issue when used with bevy_editor_pls 2024-03-04 10:45:58 +01:00
kaosat.dev
b73ecbabed chore(gltf_components): fixed bad merge 2024-03-04 09:21:40 +01:00
kaosat.dev
d00caaf414 Merge branch 'main' of github.com:kaosat-dev/Blender_bevy_components_worklflow into bevy_main 2024-03-04 09:09:13 +01:00
Mark Moissette
9cb9dda5d3
fix(bevy components): fix handling of unit/empty structs (#151)
* closes #133 
* fix(gltf_auto_export): corrected ron value for "spawnHere" components
* fix(bevy_components): fixed handling of empty/ unit structs
   * updated to/from prop_groups
   * updated tests/ expected files
   * bumped version
   * removed verbose "watching schema file for changes"
* fix(bevy_gltf_components): fixed issue of incorect handling of empty component values in non legacy mode:
   * aka: replacing empty component values (ron strings) with '()' should ONLY happen in legacy mode
   * even more aka: ron strings for component values should not be altered when not in legacy mode (provided ron
  strings should be valid)
* tests():
   * changed bevy_component tests to use testing/bevy_example as source for registry data
   * removed testing/bevy_registry_export, as it is redudant
   * related tweaks & cleanups
* chore(crates): bumped up versions because of breaking change
* chore(examples): updated registry export example to use up-to-date / fixed components data
* chore(bevy_gltf_components): added back warning about legacy mode, in a less spammy way
* docs(bevy_components): added notes about v0.3 breaking changes
2024-03-04 08:20:00 +01:00
Jan Hohenheim
64b26b2a70
Remove dead code 2024-03-03 23:33:21 +01:00
Jan Hohenheim
8a174c6c8b
Remove dead code 2024-03-03 23:27:02 +01:00
Jan Hohenheim
f9cc374ce8
Process lights coming from Blender 2024-03-03 23:22:08 +01:00
kaosat.dev
e68b230fc9 chore(cargo fmt): linting 2024-02-29 23:40:46 +01:00
kaosat.dev
7f824c47fe feat(bevy_registry_export): added boilerplate to make registry path relative to assets folder
* for bevy_gltf_components: registered GltfProcessed component (supresses a few warnings etc)
 * for the rest: cargo fmt
2024-02-29 23:38:55 +01:00
Mark Moissette
b40ab4983f
chore(gltf_auto_export): bumped version for release (#150) 2024-02-29 15:32:19 +01:00
Mark Moissette
7ffcd55f5d
fix(gltf_auto_export): fix animation export (#148)
* fix(gltf_auto_export): added  fix for correct "deep-copying" of objects & hierarchy so that animated
 meshes & nested hierarchies get exported correctly
* test(gltf_auto_export):
   * added visual testing to check for overall regression :
       * added screenshoting in bevy app
       * added visual compare with reference screenshot on python side
    * added testing of correct export of animated models 
    * added testing of correct export of empties
    * added testing of correct export of nested hierarchies
    * added testing of correct export of blueprints, with & without components etc 
* fixes #147
2024-02-29 15:27:02 +01:00
kaosat.dev
a705a238fd chore(inspector): added inspector & co 2024-02-27 08:14:49 +01:00
kaosat.dev
ca25669774 feat(bevy_gltf_components): added GltfProcessed flag component to improve performance of
iteration over added<gltfExtras>
2024-02-27 00:37:24 +01:00
Mark Moissette
dfc2be8c50
feat(gltf_auto_export): component filtering for exports, bug-fixes and tests(#143)
* added filtering out of invalid components/ custom properties:
  * includes filtering out of invalid / disabled components as defined in bevy_components, components_meta etc
 * completely changed handling of "unique" (non blueprint) objects by copying them instead of moving/renaming them & manipulating their custom properties : much cleaner, much simpler !
 * disabled default gltf export of optimised animations
 * added tests !
 * closes #139 
 * closes #141 
 * closes #142 
 * closes #146
2024-02-27 00:12:14 +01:00
Jan Hohenheim
e83ef32b9f
chore(cargo): Remove nonexistent manifest key (#138)
* Remove nonexistent manifest key
2024-02-23 00:03:15 +01:00
kaosat.dev
453b0b5d55 feat(examples):
* updated & cleaned up examples some more
 * added features/feature flags to 'common' example boilerplate
 * moved xpbd physics to common, behind a flag too
 * updated xpbd example
 * updated code for bevy_asset_loader changed api
 * more cleanups
2024-02-21 13:15:46 +01:00
kaosat.dev
dec0818222 chore(examples): updated basic_xpbd example to use v0.13 2024-02-20 21:25:36 +01:00
kaosat.dev
a28505fc39 chore(ci): updated for new release 2024-02-20 14:56:19 +01:00
kaosat.dev
3bc1a87d1e chore(examples): updated examples for bevy 0.13
* updated dependencies
 * updated code where relevant
 * temporary removed editor
 * attempting to tweak lighting/camera proxies to match Bevy's new defaults
 * updated assets where relevant
 * still wip, as bevy_xpbd is not yet updated for 0.13
 * all work except the above & save/load
2024-02-20 14:52:00 +01:00
kaosat.dev
cc2718ffd2 chore(crates): updated crates to Bevy 0.13
* updated deps
 * updated / changed code where relevant
 * updated README files
 * bumped version numbers for upcoming release
 * updated rust-toolchain
2024-02-20 14:50:27 +01:00
Mark Moissette
1ceb5050f2
feat(bevy_gltf_components): testing a different approach using only gltf extras (#134)
* not using / tracking gltf files anymore (should avoid issues with scenes vs gltf files)
 * restructured accordingly
 * closes #102
 * closes #111
2024-02-19 22:43:27 +01:00
Jan Hohenheim
e0e3a620f7
fix(): Fix invalid lints entry (#135) 2024-02-19 20:46:27 +01:00
Mark Moissette
20b6fa6077
feat(bevy_components): set of fixes & improvements (#128)
* fixed issue with "reload registry" not clearing previous data
 * added watcher/ poll system to automatically updated the registry & components list when the registry file has been changed
* BREAKING CHANGE ! changed internal representation of components, incompatible with v0.1, breaks UI values.
* added buttons to regenerate UI to account for/fix the above and to offer the ability to regenerate UI values from custom property values
* lots of cleanups
* added tests 
* closes #127 
* closes #124 
* closes #121 
* closes #130
2024-02-18 17:14:31 +01:00
Mark Moissette
0083295a4d
fix(gltf_auto_export): fixed nested collections export (#126) 2024-02-07 14:22:53 +01:00
Mark Moissette
0d708b800e
chore(): cleanup & simplification pass (#122)
* closes #118 
* closes #110 
* closes #99
2024-02-07 14:07:17 +01:00
Mark Moissette
537f08b959
chore(tools/gltf_auto_export): fixed missing version bump & minor cleanup (#120) 2024-02-06 09:46:55 +01:00
Mark Moissette
cfbda24da7
feat(tools/bevy_blueprints): bevy plugin + blender addon for components UI to more easily create components (#70)
* adds a new crate: ```bevy_registry_export``` to be able to create a json import of the registered component/type definitions
* adds a new Blender addon: ```bevy_components``` that takes that json data to generate custom UIs for components , to be to add & edit components easily in Blender 
   * also adds component metadata per object for more advanced features
   * etc
* updates to bevy_gltf_components & bevy_gltf_blueprints to add legacy_mode to support the "old"/current style component definitions
* same with gltf_auto_export Blender add_on
* closes #60
2024-02-05 23:01:19 +01:00
Mark Moissette
5c8f41b4a6
fix(gltf_auto_export): bumped version (#117) 2024-02-05 10:23:53 +01:00
Mark Moissette
2ae8351e0f
feat(gltf_auto_export): rewrite for more cleaner code & a lot of bug fixes (#109)
* fundamental rewrite of a lot of aspects of the exporter, for cleaner code & to solve a number of issues
* set export_separate_dynamic_and_static_objects default to FALSE, as it is an edge use case
* added central tracker class, to track the post save & depsgraph changes
* auto_export is now more operator centric, with functional undo
* now storing add-on configuration at the blend file level  (bpy.data.texts)
* found source of export issues ! mismatch between context.scene & context.window.scene (the last we can set, the other not)
* overhauled & cleaned up materials handling to avoid context issues & reliance on bpy.ops
* huge restructure of how temporary scenes are created & cleaned up
* added support for exports in edit_mode
* updated examples
* a lot more
* fixes #103 
* fixes #112 
* fixes #113 
* fixes #114 
* fixes #115 
* fixes #116
2024-02-05 09:49:19 +01:00
Mark Moissette
7699e87aac
feat(bevy_gltf_components): will not panic anymore if a gltf handle cannot be found (#108)
* added some minor extra debug information
* removed a useless clone() call on the gltf handle
* should resolve at least a part of #102
2024-01-31 12:30:36 +01:00
Mark Moissette
b105f628df
chore(donations): added donation button in README (#106) 2024-01-23 22:09:59 +01:00
Mark Moissette
65aa59fb6d
chore(funding): added funding file + ko-fi config (#104) 2024-01-23 16:07:45 +01:00
GitGhillie
572a2b89a6
chore(CI): Add lint CI (#100)
* Add lint CI
* Clippy allow complex types, warn on some others
* bevy_gltf_blueprints use workspace lints
* Update toolchain for workspace wide lints
* Use workspace lints on the other crates as well
2024-01-19 22:23:47 +01:00
GitGhillie
fd625ef2e0
chore(lock files ): Delete and ignore Cargo.lock files (#101)
* Delete lock files
* Ignore lock files
2024-01-19 11:49:22 +01:00
Mark Moissette
5429bf4779
feat(Save & load): new crate bevy_gltf_save_load + lots of upgrades & improvements (#95)
* feat(bevy_gltf_save_load): saving & loading implemented
   * created new crate for save & load features, uses & filters out blueprints for efficient loading
   * saving & loading, even with dynamically spawned nested hierarchies works 
   * component filter , resource filter & save path root are configurable
   * for saving: added removal & cleanup logic for children component with children
  that have been filtered out: ie no more invalid children getting stored in the save files !
   * added sending of event once saving is done

* feat(examples/save-load): example for the new crate
   * loading level static & dynamic data as blueprints
   * added a bit of ui when entering saving & loading states & cleanup when exiting

* feat(bevy_gltf_blueprints): significant rewrite of how the crate works
     * simplified spawning process, no more spawning children containing blueprints etc
     * simplified post process : instead of copying original entity  into blueprint root
      we now copy blueprint root data (components & children) into the original entity ! fixes #96 
     * much simpler code wise
     * solves issue with needing to register components that we only use on the bevy side (not gltf)
    since we are not copying the bevy data into the blueprints data
     * added **copyComponents** helper to copy components from one entity to another, excluding existing
     components on the target entity, & some bells & whistles
     * **Name** is now optional when spawning a blueprint: closes #97 
     * **Transform** is now optional when spawning a blueprint: closes #98 
     * removed transform from bundle (BREAKING change)
     * added (optional)  **NoInBlueprint** component to have finer control over whether to inject the **InBlueprint** component inside spawned blueprint entities
     * added (optional) **Library**  component, so we can override library path when we want
     * added (optional) **AddToGameWorld** component for convenience   to automatically add entities to the game world, if there is one

* chore(bevy_gltf_components): removed verbose output, cleaned it up a bit

* feat(tools/auto_export): added option to split out "dynamic" objects in main scenes
   * ie if a collection instance (or its original collection) has a "dynamic" (aka mutable, saveable etc)
     flag it can get exported to a seperate gltf file (essentially acting like an "initial save")
   * the rest of the levels (the "static" data) is exported without the dynamic objects and
     can be reused with save files !
2024-01-10 14:49:29 +01:00
Mark Moissette
42c1c71b03
fix(tools/gltf_auto_export): correctly scan for sub collections in main scenes (#94)
* scans for 'in-use' collections now correctly looks inside sub collections as well
 * removed obsolete .gltf output (keeping only .glb & .gltf+bin+textures
 * closes #92 
 * closes #93
2024-01-03 10:45:03 +01:00
yukkop
97e8e8d862
chore(rust): Add specific Rust version via rust-toolchain (#91)
* specify rust version
2024-01-03 10:43:16 +01:00
Mark Moissette
d7574a104d
feat(wasm): added working examples for bevy_gltf_components & bevy_gltf_blueprints (#90)
closes #88
2024-01-02 14:03:29 +01:00
Mark Moissette
af94e49976
feat(Gltf auto export): multiple blend files workflow, combine modes, bugfixes and more ! (#83)
* feat(multiple blend files): added example of multi blend file workflow
* feat(tools/auto_export): 
 * added collection_instances_combine_mode superseeds  & replaces "export nested blueprints", with a lot more flexibilty
 * added preferences & ui settings
 * added (optional) use of marked assets as replacement for "autoExport" collection flag
 * added correct cleaning up of temporary sub_collections
* feat(tools/auto_export): change detection added for material changes
* feat(tools/auto_export): blueprints now also use the "combine" settings for nested collections
*  feat(tools/auto_export): added correct cleanup of data when removing hollow scenes, so that there is no orphan data left behind
* feat(tools/auto_export): changes to nested collections are now triggering change detection of root
 (exportable collections)
* feat(tools/auto_export):  now actually useful tracebacks using traceback.format_exc()
* various minor fixes, cleanups & UI description improvements
* docs(README): updated & fleshed out docs

* closes #87 
* closes #86
* closes #85 
* closes #79 
* closes #61 
* closes #68 
* closes #41
2024-01-01 22:35:21 +01:00
Mark Moissette
20b34dde20
feat(bevy_gltf_blueprints): improved error handling for clone_entity (#82)
* feat(bevy_gltf_blueprints): improved error handling for clone_entity
 * you will now get component name for components that have not been registered & thus cannot be cloned
* added a small example (in examples/bevy_gltf_blueprints/basic), just press 'U' at runtime to try to spawn an entity with unregistered components
* closes #81
2023-12-27 13:14:13 +01:00
Mark Moissette
6047959b3f
feat(nested_blueprints): added support for nested blueprints both in bevy_gltf_blueprints & in gltf_auto_export (#65)
* feat(bevy_gltf_blueprints): 
  * added support for nested blueprints
  * added example/test for nested blueprints with multiple levels of nesting
* feat(tools/gltf_auto_export): 
  * implemented functionality to export nested blueprints/collection instances
  * added add prefs to control nested blueprints export
  * experiments with nested blueprints merge modes
  * when exporting of nested blueprints is disabled, will not scan for nested blueprints
and thus no export them
* docs(): updated docs & added images for nested blueprints support
2023-12-22 00:37:52 +01:00
Mark Moissette
2c4720b951
fix(tools/gltf_auto_export): fixed lacking preference config that broke the exporter (#77)
* fix(tools/gltf_auto_export): fixed lacking preference config that broke the exporter
* chore(): bumped version
2023-12-17 16:08:20 +01:00
Mark Moissette
0aead0853c
feat(scene components) : added scene components to control ambient, bloom etc from Blender(#76)
* feat(tools):  scene component injection & export
 - ambient light, shadowmap resolution, bloom intensity, ambient occlusion are now directly settable from scene components that are injected automatically in the scene 
 - relaxed requirements for changes(aka when to export gltf) for main scenes,
so that render , background etc changes also trigger a save
 - added scene components examples
 - added additional proxies &  handling for camera & lights
 - in relevant cases, made sure that entity specific components are not overridden by scene components
 - added option to toggle scene level exports of params/ components
 - ambient colour/ intensity is now also set as background/clear colour
  - updated docs
2023-12-17 15:31:25 +01:00