Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2018 01:54:12 +0000 (11:54 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2018 01:54:12 +0000 (11:54 +1000)
1  2 
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_layout.c
source/blender/makesrna/intern/rna_ui_api.c

index f3f08b102577e956125ec272ff9fb039e0bcd4a1,140fdbe355bb34e83fb8e85db01047884bb0ce2f..ec35325416a53e8b15ff34f4ded658434e45a48e
@@@ -2017,34 -1828,16 +2037,17 @@@ void uiItemPointerR_prop
        StructRNA *icontype;
        int w, h;
        char namestr[UI_MAX_NAME_STR];
 +      const bool use_prop_sep = ((layout->item.flag & UI_ITEM_PROP_SEP) != 0);
  
-       /* validate arguments */
-       prop = RNA_struct_find_property(ptr, propname);
-       if (!prop) {
-               RNA_warning("property not found: %s.%s",
-                           RNA_struct_identifier(ptr->type), propname);
-               return;
-       }
        type = RNA_property_type(prop);
        if (!ELEM(type, PROP_POINTER, PROP_STRING, PROP_ENUM)) {
-               RNA_warning("Property %s must be a pointer, string or enum", propname);
-               return;
-       }
-       searchprop = RNA_struct_find_property(searchptr, searchpropname);
-       if (!searchprop) {
-               RNA_warning("search collection property not found: %s.%s",
-                           RNA_struct_identifier(searchptr->type), searchpropname);
+               RNA_warning("Property %s.%s must be a pointer, string or enum",
+                           RNA_struct_identifier(ptr->type), RNA_property_identifier(prop));
                return;
        }
-       else if (RNA_property_type(searchprop) != PROP_COLLECTION) {
+       if (RNA_property_type(searchprop) != PROP_COLLECTION) {
                RNA_warning("search collection property is not a collection type: %s.%s",
-                           RNA_struct_identifier(searchptr->type), searchpropname);
+                           RNA_struct_identifier(searchptr->type), RNA_property_identifier(searchprop));
                return;
        }