--- tags: Assets, Asset Browser --- # Asset Types & Operations This document lists the asset types that could be supported at some point. The intention of this document is to categorise the different views on *create*, *edit*, and *use* for the various asset types. Status: **DRAFT** ## Reference Some references that may come in handy: - [T55239: Built-In Assets](https://developer.blender.org/T55239) - [blender.org Asset Bundle: Design Notes](https://hackmd.io/@JulianEisel/BylPQHux_) ## Asset Use Cases - **Add: Link**: Same as *File → Link* the datablock. - **Add: Append**: Same as *File → Append* the datablock, except that Asset metadata is not appended (i.e. an appended asset does not become a new asset in the current file). - **Add & Assign**: Assign to an already-existing datablock; assign Mesh to Object, assign material to active material slot. Requires linking/appending. - **Apply**: For preset-like data. Temporarily load from asset library, copy onto other data. Does not require linking/appending. **NOTE**: "Add" is not required when working with the *Current File* library. > [color=#6b23ef] > [name=Sybren A. Stüvel] > Nice for future: panel for brushes, or presets (like FFmpeg prefs), which get auto-populated with assets from the library. > - question: which library is used? which filter options? > - could also be used for materials. > [color=#6b23ef] > [name=Sybren A. Stüvel] > TODO Sybren: add two uses: > - Browser-based > - Tool-contextual (like in 3D Viewport) ## Choice of Link or Append: - Could be stored in multiple places: - Option per library (f.e. project libs that link vs. personal libs that append). - Property of individual Assets (unspecified, always link, always append). This could be extended to include external files as well (e.f. texture files of a Material). - Option in the Asset Browser, with pinning for the option in the browser so that it doesn't follow the selected asset. - Default implementations: link-all or append-all, just like the operators in the File menu. - Allow Python callback to influence this, for example to append the Asset datablock itself, but to keep the rest linked. - Add-ons can define their own panels & callbacks, and register their own bundled asset library. They can indicate whether this should replace the default "link/apply" / "Add Asset" panel or extend them. > [color=#6b23ef] > [name=Sybren A. Stüvel] > TODO: define how these callbacks & panels are registered/discovered. ## Finding and Editing How do I find and edit an asset? How much will the Asset Browser help? **Conclusion: just have a "Set As Active" button.** No smartness for editing. - Works nice for Object, Scene - For Object Data, Materials: changing data pointer would be an "Assign" operation and not an "edit" operation. In other words: using and editing are the same thing, when working with "Current File" assets. - For Action: choice between "Assign" and "Apply" (as pose). ### Abbreviations - **MAA** Mark As Asset - **SAA** Set As Active | Type | Can Link | Can App | Can Temp | Use | Create | "Find My Asset" (in *Current File* lib) | |-----------------------------------------|----------|---------|----------|--------------------------------------------|-------------------|---------------------------------------------------| | Scene | ✓ | ✓ | | SAA | MAA | SAA scene | | Collection | ✓ | ✓ | | Add as Scene Collection or Empty | MAA | SAA collection of scene | | Object | ✓ | ✓ | | Add to Scene at 3D cursor | MAA | if in scene → SAA | | | | | | | | else → message "not in scene" | | Object Data (mesh, light, camera, etc.) | ✓ | ✓ | | Assign or Create new Object at 3D cursor | MAA | if used by object in scene → Set Object as Active | | | | | | | | else → message "not in scene" | | Action | ✓ | ✓ | ✓ | Assign or Set Pose | Copy Partial, MAA | if object suitable → SAA on object | | | | | | | | else → message "requires object of type X" | | Material | ✓ | ✓ | | Assign to active mat slot of active object | MAA | same as Use/Apply? | | Shading node tree | ✓ | ✓ | | - | MAA | | | Geometry Nodes node tree | ✓ | ✓ | | - | MAA | | | Image | ✓ | ✓ | | - | MAA | | | Sound | ✓ | ✓ | | - | MAA | | > [color=#6b23ef] > [name=Sybren A. Stüvel] > Idea: show usage count (in the current blend file) of an asset in the bottom-right corner of the asset. > [color=#6b23ef] > [name=Sybren A. Stüvel] > Future: Property presets (like render settings) would not be linkable/appendable. ## Design consideration: Asset relationships * Most assets work only in relation with others; Mesh needs Object, Node Group needs Material which needs an Object in order to see & edit it. * Assets need such a context to be viewed/edited. * Collections & Objects: can be linked to scene and viewed/edited directly, * Other datatypes: need some in-between (Mesh/Curve/Light/Camera/etc needs Object, Action/Pose needs object of the correct type)