Blender Git Commit Log
Git Commits -> Revision 792eb13
Revision 792eb13 by Julian Eisel (temp-asset-browser-poselib-merge) July 14, 2021, 15:02 (GMT) |
Assets: AssetHandle type as temporary design to reference assets With temporary I mean that this is not intended to be part of the eventual asset system design. For that we are planning to have an `AssetRepresentation` instead, see T87235. Once the `AssetList` is implemented (see T88184), that would be the owner of the asset representations. However for the upcoming asset system, asset browser, asset view and pose library commits we need some kind of asset handle to pass around. That is what this commit introduces. Idea is a handle to wrap the `FileDirEntry` representing the asset, and an API to access its data (currently very small, will be extended in further commits). So the fact that an asset is currently a file internally is abstracted away. However: We have to expose it as file in the Python API, because we can't return the asset-handle directly there, for reasons explained in the code. So the active asset file is exposed as `bpy.context.asset_file_handle`. |
Commit Details:
Full Hash: 792eb1381ea4c823768b6b440dd8a9c402ffbbdc
Parent Commit: 3713251
Lines Changed: +109, -0
8 Modified Paths:
/source/blender/blenkernel/BKE_context.h (+4, -0) (Diff)
/source/blender/blenkernel/intern/context.c (+25, -0) (Diff)
/source/blender/editors/asset/asset_edit.cc (+7, -0) (Diff)
/source/blender/editors/include/ED_asset.h (+2, -0) (Diff)
/source/blender/makesdna/DNA_asset_types.h (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_asset.c (+32, -0) (Diff)
/source/blender/makesrna/intern/rna_context.c (+27, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/context.c (+25, -0) (Diff)
/source/blender/editors/asset/asset_edit.cc (+7, -0) (Diff)
/source/blender/editors/include/ED_asset.h (+2, -0) (Diff)
/source/blender/makesdna/DNA_asset_types.h (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_asset.c (+32, -0) (Diff)
/source/blender/makesrna/intern/rna_context.c (+27, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)