[Bf-committers] Custom Property UI data API changes

Hans Goudey mail at hansgoudey.com
Tue Aug 31 21:02:29 CEST 2021


Hi all,

I wanted to mention some changes to the way UI data like min and max 
are exposed in the Python API for custom properties (IDProperties), 
since it might affect some addons or scripts. The idea was to simplify 
the way UI data values were stored internally, and to take the 
opportunity to provide a proper API for changing the values. Since the 
patch [1] landed, the "_RNA_UI" group is not used to store these values 
anymore, instead they are embedded in each property.

The release notes [2] and the patch go into more detail about the 
changes in the API, but the basic pattern is retrieving a "manager" 
object for a custom property's UI data with `id_properties_ui(name)` 
and using its methods to change the data. Generally I don't expect most 
scripts to have to change anything, but I already made the few changes 
necessary in the addons repository with this commit [3].

Hopefully this isn't to disruptive to anyone.

Thanks!
Hans


[1] <https://developer.blender.org/D9697>
[2] 
<https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Python_API#Breaking_Changes>
[3] <https://developer.blender.org/rBA104ba1c568201>








More information about the Bf-committers mailing list