Blender Git Commit Log
Git Commits -> Revision 91b3814
Revision 91b3814 by Julian Eisel (soc-2021-porting-modifiers-to-nodes-decimate, soc-2021-porting-modifiers-to-nodes_all) July 30, 2021, 14:51 (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: 91b38143010c471854f741175434822834c3a69d
Parent Commit: fada98c
Committed By: Fabian Schempp
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)