diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-09-22 01:10:53 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-09-22 01:10:53 +0300 |
commit | 6f806045093419a55b16c596dd8690ea0bbae138 (patch) | |
tree | d433547b5049fa83ff1312e17840ad6f4801ca2e /source/blender/makesrna/intern/rna_animation.c | |
parent | 9493e3b2d6da63bad3f8f4ac876a38072517111a (diff) |
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index e37affcf5a3..cdbf7582fa7 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -89,7 +89,7 @@ static void rna_AnimData_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); } -static int rna_AnimData_action_editable(PointerRNA *ptr) +static int rna_AnimData_action_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { AnimData *adt = (AnimData *)ptr->data; @@ -305,7 +305,7 @@ static StructRNA *rna_ksPath_id_typef(PointerRNA *ptr) return ID_code_to_RNA_type(ksp->idtype); } -static int rna_ksPath_id_editable(PointerRNA *ptr) +static int rna_ksPath_id_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { KS_Path *ksp = (KS_Path *)ptr->data; return (ksp->idtype) ? PROP_EDITABLE : 0; @@ -393,7 +393,7 @@ static void rna_KeyingSet_name_set(PointerRNA *ptr, const char *value) } -static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr) +static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { KeyingSet *ks = (KeyingSet *)ptr->data; |