Problem with Directory Scanner

Raconteur's picture

Hi all,

I have a very simple comp that uses a Directory Scanner to load up a bunch of images and display them. This seems as though it should be very simple, but man it has been a PITA.

First it took many searches to find out what the key of the filename member of the DS output structure was. In case anyone is wondering (which you probably aren't because I seem to be the only one who DIDN'T know this... :P) it is "url" in LOWERCASE.

But now my problem is no images appear. I can open the Console and see a series of messages that say

2/26/10 9:36:15 AM   Quartz Composer[230]   *** Message from <QCImageDownloader = 0x192A9910 "ImageDownloader_1">:
Failed starting image download for URL "file://localhost/Library/Desktop%20Pictures/Abstract/Abstract%207.jpg"

This happens for every image in the folder. I can plug that URL into a browser and it shows up just fine.

Any idea what is happening?

For reference, here is the comp outline: In the main comp

  • Directory Scanner <File List> ==> Structure Count <Structure>
  • Directory Scanner <File List> ==> Iterator <published Structure input>
  • Structure Count <Count> ==> Iterator <Iterations>

In the Iterator:

  • Iterator Variables <Current Index> ==> Structure Index Member <Index>
  • Structure Index Member <Structure is published and filled from the Dir Scanner>
  • Structure Index Member <Member> ==> Structure Key Member <Structure>
  • Structure Key Member <Member> ==> Image Importer <Image Location> ** key is set to "url"
  • Image Importer <Image> ==> Sprite <Image>
  • Iterator Variables <Current Position> ==> Math <input> (transformed by adding 20) ==> Sprite <X Position>

Everything seems to be in order, but like I said... no images show.

Thanks for any input!

Chris

Raconteur's picture
Re: Problem with Directory Scanner

Crud... sorry for the awful formatting... trying to use Markdown to make an unordered list, but obviously wasn't successful. :(

cybero's picture
Re: Problem with Directory Scanner

It's tricky - at first, especially with looping back results to feed forward as it would seem one is meant to do.

See the vimeo tutorial from goto10 works just fine. also see http://himiko.dnsalias.net/twiki/bin/view/Main/QuartzComposer which has a works and don't work exemplar downloads at the bottom of their wiki tutorial page , good clear written resource.

Raconteur's picture
Re: Problem with Directory Scanner

Hi guys,

Thanks for the help. This is REALLY weird. In the Comp Repo, I found an example of EXACTLY what I was doing, although the author (smokris) queued up all of the images and then iterated over the queue to display them.

His example ran just fine, and the guts were identical, except that the Image Importer I was using was not set to do a Synchronous Download, whereas his was.

I made that change and nothing happened. Then I ran his and ran mine a couple of times to see if I could spot other differences, and suddenly, mine started working. Well, actually the errors ceased and the images were loading. But they still were not displaying on the screen.

So I swapped the Sprite for a Billboard (with no setting changes at all), and now it works.

This feels like a bug, but without many tools, or docs on QC, I am loathe to suggest that.

Anyone ever see this sort of instability in QC?

Cheers,

Chris

cybero's picture
Re: Problem with Directory Scanner

Raconteur, you've just ran up against quartz composer cache "as it happens" -> you need to save compositions that are open . you might also benefit from clearing the quartz composer editor cache ~/Library/Caches/QCCompositionRepository-com.apple.QuartzComposer.editor.cache , that should clear up most problems for you.

Sometimes one needs to go further.

Bug wise - if you don't already know - report to http://bugreport.apple.com/

Also see http://kineme.net/forum/Discussion/Tutorials/HowwriteAwesomeBugReportsPi... for one of the team members that will eventually deal with your bugs and feature requests. [christopher wright]

Make sure that you have a good clean installation, check your GraphFoundation Log and Console log for any pertinent error messages and ensure that you haven't mis-installed any patches or plugins, KinemeCore is outstanding in this area as well as being a great plugin installation helper too.

Always a good idea IMHO to restart QC if one's been installing virtual macros, patches and plugins, all of which, apart from the virtual macros, will only load if apprehended at boot time. Some of the virtual macros can prove to be less than stable in some instances until one has refreshed QC's association with its patches and plugins at boot time.

BTW, it is always worthwhile searching this site as often as not , the question has been answered before now, with examples :-)

In addition it shouldn't be necessary at all to swap a Sprite with it's x,y,z rotations for a single plane rotating billboard :-)

Raconteur's picture
Re: Problem with Directory Scanner

Cheers on all accounts!

cybero's picture
Re: Problem with Directory Scanner

Forgot to mention, if you are using an image resize patch you will have to set the dimensions - no go on the 0,0 bounds.

If you are iterating , then using a Sprite means you have better options for stacking the images.

Also take a look at the travellator and cover flow examples. If you are using Leo these should run smoothly, but on Snow Leo, it can be one of those comps were we are waiting for iterations to work as briskly on SnowLeo as they do Leo.

Have a look at the Travelator and Wall System Repository examples, they show very well how to iterate as does the QC Cover Flow example -see http://vimeo.com/7595878 and also see this attached example, made in 2008- still runs true - drop this into any directory of images and just let it run :-)

PreviewAttachmentSize
Cover Flow Export.qtz468.48 KB

dust's picture
Re: Problem with Directory Scanner

if you hover your mouse over a structures output, QC will show you structures format and you can see the key members of the structured file. this should help if you do not know the key your looking for. well actually to get this structure preview by hovering... the structure needs to be hooked up to something.

usefuldesign.au's picture
Re: Problem with Directory Scanner

"... the structure needs to be hooked up to something."

Hooked up to something Pink (on 10.5 that is) a consumer patch like iterator or sprite.

smokris's picture
Re: Problem with Directory Scanner

...and if you don't know what the structure contains, and thus how to dissect it, a handy trick is to just connect it to the "Enable" input of any consumer patch --- it'll always execute at least once, and hovering over the output port will show you the structure data which you can then break down.

jersmi's picture
Re: Problem with Directory Scanner

I have a comp mde in QC3 set up to use the directory scanner -- worked then but now with a new folder of movies I get 0 members rolling over the File List. Tried cybero's suggestions for cleaning cache, etc. No weird console messages. What to do?

Edit: attached a stripped down version.

PreviewAttachmentSize
Folder_Movies_0.qtz5.66 KB

cybero's picture
Re: Problem with Directory Scanner

You need to set your Directory Scanner to scan recursively for movies, though you could also scan recursively for Images, which is what your patch is set to, or indeed for .qtz files [compositions] .

If you want your audio to play you need to set your movie patch to be asynchronous.

You might also want to take a look at the following threads -->

http://kineme.net/Discussion/DevelopingCompositions/MovieplaylistXML

http://kineme.net/Discussion/Leopard/DirectoryScannerPlayingMultipleMovi...

jersmi's picture
Re: Problem with Directory Scanner

Thanks, cybero, for the links and for patience giving me the benefit of the doubt for not being an idiot and selecting the movie/recursive button. It was late at night... works just fine...