Blender_bevy_components_wor.../tools/blenvy/TODO.md
kaosat.dev ed0c85b66e feat(Blenvy): more work done on materials handling overhaul (wip)
* split out materials scan from injection of materialInfo into objects
 * added material Asset injection into list of assets at scene level
 * related tweaks & cleanups
 * continued overhaul on the bevy side
2024-06-10 00:31:23 +02:00

6.2 KiB

Auto export

  • the original blueprints & levels path are now left as is, and there is an auto injection of xxxpath_full for absolute paths

    • replace all uses of the paths with the correct ones above
      • levels
      • blueprints
      • materials
  • move out the UI for "assets" folder out of "blueprints condition"

  • 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)

    • main/ library scene names
    • paths
  • 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_<scene_name>_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

  • store assets
    • per main scene for level/world assets
    • per blueprint for blueprint in lib scene
  • UI:
    • 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 ?
      • the assets of local blueprints

Blueprints: - [x] on save: write IN THE COLLECTION PROPERTIES - list of assets - export path - [ ] 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 - [ ] upgrade all operators: - [x] add - [x] remove - [x] copy & paste - [ ] OT_rename_component - [ ] Fix_Component_Operator - [ ] add handling for core::ops::Range & other ranges - [ ] fix is_component_valid that is used in gltf_auto_export - 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

- [ ] 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

General things to solve:

  • save settings

  • load settings

    • add blueprints data
  • rename all path stuff using the old naming convention : "blueprints_path_full"

  • generate the full paths directly when setting them in the UI

    • problem : how to deal with defaults: do it on start/load ?
  • 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
  • addon-prefs => settings

  • generate_gltf_export_settings => should not use add-on prefs at all ? since we are not overriding gltf settings that way anymore ?

  • remove hard coded path for standard gltf settings

  • load settings on file load

    • auto_export
    • components
    • add handling of errors when trying to load settings
  • force overwrite of settings files instead of partial updates ?

  • add tests for disabled components

  • fix auto export workflow

  • should we write the previous _xxx data only AFTER a sucessfull export only ?

  • add hashing of modifiers/ geometry nodes in serialize scene

  • add ability to FORCE export specific blueprints & levels

  • undo after a save removes any saved "serialized scene" data ? DIG into this

  • handle scene renames between saves (breaks diffing)

  • change scene selector to work on actual scenes aka to deal with renamed scenes

    • remove get_main_and_library_scenes as it should not be needed anymore
  • fix asset file selection

  • change "assets" tab to "levels"/worlds tab & modify UI accordingly

  • add option to 'split out' meshes from blueprints ?

    • ie considering meshletts etc , it would make sense to keep blueprints seperate from purely mesh gltfs
  • remove 'export_marked_assets' it should be a default setting

  • disable/ hide asset editing ui for external assets

  • inject_export_path_into_internal_blueprints should be called on every asset/blueprint scan !! Not just on export

  • fix level asets UI

  • 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 ?)
  • remove BlueprintsList & replace is with assets list

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