From 6f806045093419a55b16c596dd8690ea0bbae138 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 22 Sep 2016 00:10:53 +0200 Subject: RNA/UI: Allow displaying in tooltip why RNA property isn't editable This commit allows RNA properties to return additional info on their editable state which may then be displayed in tooltips. To show how it works, it also adds some info for the editable check of proxies. For generally un-editable properties or properties of a linked data-block, RNA returns default strings. | {F362785} | {F362786} | {F362787} | Reviewed by brecht, thanks! Differential Revision: https://developer.blender.org/D2243 --- source/blender/makesrna/RNA_access.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesrna/RNA_access.h') diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 2893fabd145..44d1a6bfaaf 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -856,6 +856,7 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop); int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value); bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop); +bool RNA_property_editable_info(PointerRNA *ptr, PropertyRNA *prop, const char **r_info); bool RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index); bool RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop); /* without lib check, only checks the flag */ bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop); -- cgit v1.2.3