Blender Git Loki

Git Commits -> Revision a048551

March 16, 2021, 14:45 (GMT)
Use custom .py property for active asset index, stored in the workspace

Previously I just used the active color index of the first palette to
get things to work.
I would've preferred if the asset view template could register own
properties and store them in the `UIList` it creates. That way you could
have multiple asset views with entirely independent data. But since this
isn't possible, we need a different way to store such data, I think the
workspace makes sense. It should still be possible to store different
data for different use-cases, e.g. to show a pose asset list in pose
mode and a material asset list in object mode. So idea is to let
scripts/add-ons register custom properties for their specific use case
(e.g. "Active Pose Asset" for the pose libraries).

Commit Details:

Full Hash: a0485515d3099ec9c298e40aa7c5abd184bab32a
Parent Commit: c72501d
Lines Changed: +57, -28

5 Modified Paths:

/release/scripts/startup/bl_ui/space_view3d.py (+1, -1) (Diff)
/release/scripts/startup/bl_ui/__init__.py (+11, -2) (Diff)
/source/blender/editors/include/UI_interface.h (+3, -1) (Diff)
/source/blender/editors/interface/interface_template_asset_view.cc (+13, -20) (Diff)
/source/blender/makesrna/intern/rna_ui_api.c (+29, -4) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021