diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-11-26 01:59:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-11-26 02:00:24 +0400 |
commit | 02f90c000115d5d2ab330005e20d02419defe35a (patch) | |
tree | 932763725edb3642e3e3da0905e02676f42a54e8 /source/blender/makesrna/intern/rna_access.c | |
parent | 07bde9e797c73a0cdbeef315755874ff711a6414 (diff) |
User Interface: don't show macro args in tooltips
was often making much too big strings to show in a tip.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 6c216936190..1811f2e1a5f 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -5040,7 +5040,7 @@ char *RNA_pointer_as_string(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *p /* context can be NULL */ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, - const bool as_function, const bool all_args, + const bool as_function, const bool all_args, const bool nested_args, const int max_prop_length, PropertyRNA *iterprop) { @@ -5069,6 +5069,10 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, continue; } + if ((nested_args == false) && (RNA_property_type(prop) == PROP_POINTER)) { + continue; + } + if (as_function && (flag & PROP_REQUIRED)) { /* required args don't have useful defaults */ BLI_dynstr_appendf(dynstr, first_iter ? "%s" : ", %s", arg_name); @@ -5113,14 +5117,14 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, } char *RNA_pointer_as_string_keywords(bContext *C, PointerRNA *ptr, - const bool as_function, const bool all_args, + const bool as_function, const bool all_args, const bool nested_args, const int max_prop_length) { PropertyRNA *iterprop; iterprop = RNA_struct_iterator_property(ptr->type); - return RNA_pointer_as_string_keywords_ex(C, ptr, as_function, all_args, + return RNA_pointer_as_string_keywords_ex(C, ptr, as_function, all_args, nested_args, max_prop_length, iterprop); } @@ -5137,7 +5141,7 @@ char *RNA_function_as_string_keywords(bContext *C, FunctionRNA *func, RNA_struct_iterator_property(funcptr.type); - return RNA_pointer_as_string_keywords_ex(C, &funcptr, as_function, all_args, + return RNA_pointer_as_string_keywords_ex(C, &funcptr, as_function, all_args, true, max_prop_length, iterprop); } |