library data selector, respect hide dot data, unless the user enters a '.'

(commit 27435 by Campbell from render25 branch)
This commit is contained in:
Brecht Van Lommel 2010-03-16 17:23:51 +00:00
parent 63a368ceaa
commit 74fc6a07c0

@ -31,6 +31,7 @@
#include "DNA_color_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "BLI_string.h"
@ -164,6 +165,12 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea
/* ID listbase */
for(id= lb->first; id; id= id->next) {
if(!((flag & PROP_ID_SELF_CHECK) && id == id_from)) {
/* hide dot-datablocks */
if(U.uiflag & USER_HIDE_DOT)
if ((id->name[2]=='.') && (str[0] != '.'))
continue;
if(BLI_strcasestr(id->name+2, str)) {
iconid= ui_id_icon_get((bContext*)C, id, 0);