[AddOn] File Browser Search

(sftd) #1

File Browser Search

Video Tutorial: https://vimeo.com/channels/823243

An Add-on that I wrote 2 years ago and finally decided to get back to it and try to make it accepted into Blender.

Above link redirects you to Beta version of newer version of my Add-on. I almost completely rewrote the whole code and added a few tweaks. More information about this Add-on in my old post below.

I would appreciate your feedback on Bugs and eventually missing functionality. Here is tracker on developer.blender.org:
https://developer.blender.org/T30386

If you prefer old version (more stable, but less fun :slight_smile: ) the link is here: Old Version.

Old Post

My first AddOn :wink:

It allows You to do a quick search, when using File Browser (selecting textures, fonts, etc.)

I made it because:

  1. My girlfriend asked me to :wink:
  2. I wanted to learn how to write Blender Add-Ons.

I didn’t even check if something like this already exists (to not discurage myself), so if it does I’m sorry for taking Your time.

Didn’t plan to put it here, but in the end it actually started to work and I thought that someone may find it useful.


Search input - put there fraze You are looking for
Results - displaying found results
Open automatically - if disabled clicking on result will just put file name in file browser (you need to click “open”, to actually open it), if enabled it automatically opens/uses the file after you click item in Results Box
Hide Extensions - hides extensions :wink:
Number of Columns - allows You to chose number of columns in wchich Your results will be displayed.

Hope someone will find it useful. If You have any suggestions how to improve this AddOn’s functionality then feel free to say so :wink:

IMPORTANT: I haven’t fully tested it yet. It may contain some bugs.

UPDATE:

  • Added “Subdirectory Search” option: searches in currently opened folder and it’s subdirectories.

UPDATE:

  • Now searching through materials, objects, etc. when linking or appending is also possible.

UPDATE:

  • Added NodeGroup search support. If something else there (when linking) isn’t working please notice me.

UPDATE:

  • Using * like in windows regular expressions works now, i.e. “.blend", "my.jpg”

UPDATE:

  • Added icons.
  • Added search for directories options.
  • You can now look for files even when appending or linking blend data. Though clicking file (with “Open on Click” option) will result in opening files directory in File Browser.
  • A few minor tweaks that should improve functionality.

UPDATE:

  • File Browser filters are applied to search results

UPDATE:

  • Blender 2.72 compatibility (previous version used with 2.72 would crash when appending data from .blend files).

UPDATE:

  • Blender 2.74 compatibility
0 Likes

(bat3a) #2
  1. My girlfriend asked me to :wink:

you have a girlfriend WHICH in 3d and uses blender :O, awesome.

will include in my next build (if Allah wishes)

0 Likes

(sftd) #3

I introduced blender to her a few years ago and she got into it. Now she can make pretty good stuff in 3d. I will probably post some of it one day :wink:

Glad You find it useful :slight_smile:

0 Likes

(Lsscpp) #4

can this addon search through a folder tree? or it finds only files in current opened folder?

0 Likes

(sftd) #5

It searches only in currently opened folder.

But if You think searching through folder tree might be useful I think adding that option won’t be a problem (when I will find a few free minutes of my life :wink: )

(To be sure, You mean:
You are in: Dir1, and search for: file1.ext
and it should find it for example in: Dir1\Dir2\file1.ext
? - or You have something else in mind?)

0 Likes

(bleber) #6

Good work!
I think that it is a great addon.
I test if these addon work in other situation, in a append context, and it not working when append a object or other thing… it is planed to filter in other situations, for example when append a object from another blender file?

0 Likes

(Dread Knight) #7

Been waiting for something like this forever xD

0 Likes

(Lsscpp) #8

yes i was thinking of search into subfolders too, but it also could be “search anywhere” :wink:

0 Likes

(sftd) #9

Updated. Hope that’s what You were asking for.

Thanks. To make this plugin working in link_append context is a great idea. Unfortunately I tried to find in Blender API how to read data from external .blend file and it seems impossible for now (or what is also possible I searched wrong). It probably could be done by implementing c-function from blender source or writing python .blend file parser. I will try to look into it.

If anyone knows a simpler way to do this and will share it with me I will implement it right away :slight_smile:

0 Likes

(sftd) #10

Hi!

By pure accident I found how to enable this plugin in link_append mode. I took a few free moments of my time and updated the script.

For now “tree-search” in link_append mode is not possible, cause I’m affraid it might be more confusing than useful but if anyone think it might be a helpful function I’m willing to make that change.

0 Likes

(sftd) #11

Hi,

I realized that some time ago (a few months…) I made a small update to this add-on that prevents this addon settings from being reseted (is that a word?) when closing blender. Uploaded a new version if anyone is interested.

File Browser Search

0 Likes

(Sahkan) #12

Thanks you are awesome ! every broweser should have one .

0 Likes

(Aya0) #13

Simple and great every Blender should have this one! :slight_smile:

0 Likes

(karlis.stigis) #14

I have always missed the possibility to hit some letter key and get the first name with that letter selected, like in normal finder or explorer…

0 Likes

(bashi) #15

That’s great. Thank you. I wish it would work for linking NodeGroups too…

YES +1 Big time.

0 Likes

(sftd) #16

Just added NodeGroup support :slight_smile: Please download again.

If there is something else that isn’t linking please notice me about that (there reason is not that it can’t I just probably made a mistake somewhere or it wasn’t supported year ago when I was making this script).

0 Likes

(bashi) #17

thanx a lot, will try it :wink:

0 Likes

(comeinandburn) #18

very nice, thanks:)

0 Likes

(2nis) #19

Thanks a lot, very useful and time saving addon. Works fine in 2.67a
A suggestion for some improvement came in my mind when I got plenty of cache files in the results list:
Would be nice to be able to filter results to blend files or texture files.
Also, could be useful to allow to search by extention type like *.blend for example.

0 Likes

(sftd) #20

Updated. Using * like in windows regular expressions should work now. :slight_smile:

0 Likes