ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Allow access to underlying asset data in asset blueprint fields

Open daun opened this issue 11 months ago • 2 comments

It'd be great to get access to the underlying asset data in custom field conditions of asset blueprints. Currently, we only get access to the values of other fields in the same blueprint.

Example: only show an autoplay toggle in the asset blueprint if the path of the asset ends with .mp4 — this is currently not possible as the custom field conditions do not have access to width, height, path, etc.

fields:
  -
    handle: autoplay
    field:
      type: toggle
      display: Autoplay
      inline_label: Autoplay
      inline_label_when_true: Autoplay
      if:
        this: 'custom video'

daun avatar Feb 28 '24 18:02 daun

Not a great solution, but it could work for you for now: Each container can have its own blueprint, so you could consider having a container just for your videos, and then in that blueprint you can put the video-specific fields.

jasonvarga avatar Feb 28 '24 18:02 jasonvarga

@jasonvarga I've thought about that, but I prefer the user experience of having all media in a single asset container. But I can probably hide the video-specific options behind a Revealer. Or set a custom hidden is_video field in the AssetCreated event that I will have access to as it's part of the blueprint. So many options đŸ¤ 

daun avatar Feb 28 '24 18:02 daun