Blender Git Loki

Git Commits -> Revision 55c38f4

Revision 55c38f4 by Alexander Gavrilov (master)
August 14, 2019, 10:38 (GMT)
Custom Properties: allow changing the property UI to color picker.

To fully support storing colors as a custom property, it is necessary
to allow switching the property UI to the standard color picker button.
That means in effect supporting custom property subtype values.

Change RNA_property_subtype to look for a 'subtype' string field
in _RNA_UI and parse it as an enum value. To minimize performance
impact, only do it if the property is an array; also, don't use
the custom subtype during RNA path parsing.

On the python side, allow setting some most useful seeming values
from the custom property settings editor.

Also, since some color picker code seems to run into a risk of
buffer overruns if the array size is wrong, check the size in
the UI layout code to be safe.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5475

Commit Details:

Full Hash: 55c38f476e6d599eb5377334976ab71b97fe359a
Parent Commit: c47c7a4
Lines Changed: +77, -7

5 Modified Paths:

/release/scripts/modules/rna_prop_ui.py (+4, -0) (Diff)
/release/scripts/startup/bl_operators/wm.py (+45, -2) (Diff)
/source/blender/editors/interface/interface_layout.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_access.c (+26, -3) (Diff)
/source/blender/makesrna/RNA_types.h (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021