Skip to content

Conversation

@Sanakan8472
Copy link
Contributor

Asset Package References

  • fixes Refactor asset dependency handling #814
  • Added ezDependencyFlags which defines how a reference in an asset is used:
    • Thumbnail: This reference is a dependency to generating a thumbnail.
    • Transform: This reference is a dependency to transforming this asset.
    • Package: This reference is needs to be packaged as it is used at runtime by this asset.
  • ezAssetBrowserAttribute now has a new parameter to set the ezDependencyFlags for it. By default, ezDependencyFlags::Thumbnail | ezDependencyFlags::Package is set.
  • Fixed naming of various enums and member variables to match the new transform, thumbnail and package dependency naming pattern.

Circular Dependencies

  • Circular dependencies will no longer deadlock the editor and instead result in a new error code on one of the assets in the circle: ezAssetInfo::TransformState::CircularDependency.
  • ezAssetCurator::GenerateTransitiveHull is no longer recursive and can handle circular dependencies.
  • Added ezAssetCurator::GenerateInverseTransitiveHull which generates a set of all assets that depend in the given asset. Used by the new ezAssetCurator::CheckForCircularDependencies function.
  • ezAssetCurator::InvalidateAssetTransformState is no longer recursive, using GenerateInverseTransitiveHull instead.
  • ezQtAssetPropertyWidget::InternalSetValue will prevent the user now from creating circular dependencies.

Misc

  • Added Asset.WriteDependencyDGML action which creates a DGML file containing all transform and thumbnail dependencies this asset transitively depends on. Very useful to understand circular dependencies.
  • Added ezAssetActions::MapMenuActions to put Transform Asset and Write Dependency DGML into the edit menu.
  • ezCollectionAssetDocument are no longer updated automatically as their transitive naturure can't be tracked correctly by the currently defined ezDependencyFlags. Instead, they are set to manual transform and will be auto-generated on every scene export.

jankrassnigg and others added 2 commits March 19, 2023 18:13
## Asset Package References
* Added **ezDependencyFlags** which defines how a reference in an asset is used:
  *  **Thumbnail**: This reference is a dependency to generating a thumbnail.
  *  **Transform**: This reference is a dependency to transforming this asset.
  *  **Package**: This reference is needs to be packaged as it is used at runtime by this asset.
* **ezAssetBrowserAttribute** now has a new parameter to set the `ezDependencyFlags` for it. By default, **ezDependencyFlags::Thumbnail | ezDependencyFlags::Package** is set.
* Fixed naming of various enums and member variables to match the new `transform`, `thumbnail` and `package` dependency naming pattern.

## Circular Dependencies
* Circular dependencies will no longer deadlock the editor and instead result in a new error code on one of the assets in the circle: **ezAssetInfo::TransformState::CircularDependency**.
* **ezAssetCurator::GenerateTransitiveHull** is no longer recursive and can handle circular dependencies.
* Added **ezAssetCurator::GenerateInverseTransitiveHull** which generates a set of all assets that depend in the given asset. Used by the new **ezAssetCurator::CheckForCircularDependencies** function.
* **ezAssetCurator::InvalidateAssetTransformState** is no longer recursive, using **GenerateInverseTransitiveHull** instead.
* **ezQtAssetPropertyWidget::InternalSetValue** will prevent the user now from creating circular dependencies.

## Misc
* Added **Asset.WriteDependencyDGML** action which creates a DGML file containing all transform and thumbnail dependencies this asset transitively depends on. Very useful to understand circular dependencies.
* Added **ezAssetActions::MapMenuActions** to put `Transform Asset` and `Write Dependency DGML` into the edit menu.
* **ezCollectionAssetDocument** are no longer updated automatically as their transitive naturure can't be tracked correctly by the currently defined `ezDependencyFlags`. Instead, they are set to manual transform and will be auto-generated on every scene export.
@jankrassnigg
Copy link
Member

This also fixes #580.

@jankrassnigg jankrassnigg added this to the Release 23.04 milestone Mar 27, 2023
@jankrassnigg jankrassnigg added the improvement Improves an existing feature label Mar 27, 2023
@jankrassnigg jankrassnigg merged commit 1c934f6 into dev Mar 27, 2023
@jankrassnigg jankrassnigg deleted the user/cm/assetDeps branch March 27, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor asset dependency handling

3 participants