Unsupported — We cannot guarantee that this software will work properly on Mac OS 10.8 and above. Please be careful.

Release: File Tools, v20071211

Release Type: Beta
Version: 20071211
Release Notes

This is an update to the File Tools beta that includes some new patches.

New Patches included:

  • Text File Writer — used to be a stand-alone plugin
  • Structure To File — saves structure contents to a file..
  • Structure From File — loads a structure from a file (saved with Structure To File)

Currently, the structure loader does not preserve the order of items in the structure. This means that items at a given index won't necessarily be at the same index when they're loaded. To get around this, access the structure by Key only. Working on a fix for this...

PreviewAttachmentSize
FileTools-20071211.zip45.1 KB

.lov.'s picture
Fine!

The Text File Writer patch works fine for me, but not the Structure To File: nothing happend when i sended a Write Signal for it. But at the moment, text file writing more than enough for me.

cwright's picture
structure to file

Did you get any messages in Console.app? Could you provide a sample composition with the structure to file that doesn't work?

Structures have a weird format that isn't quite an array, and isn't quite a dictionary, so I had to write a thin translation layer to make it all happy. Perhaps I missed a case.

.lov.'s picture
it works:)

i made a simple project with a directory scanner and a structure tu file path, and works fine. i don't know what i missed in early, i made the same...

i find this is the console:

12/12/07 1:17:22 PM Quartz Composer[16240] *** EXCEPTION IGNORED: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key 12/12/07 1:22:58 PM Quartz Composer[16240] *** EXCEPTION IGNORED: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key

cwright's picture
Nice :)

Ok, if you can reproduce that sometime, please let me know. That's exactly what it says when it doesn't correctly handle the structure. There may be more to handle. Or maybe it's caused by giving a write signal without a structure plugged in?

.lov.'s picture
sure...

first i didn't plug the structure, i am sure:) Secondary i plugged in and didn't works. But now, it works (i think the bug is in me:)

franz's picture
auto rename sub structures ?

HI i'm using this plug. to record a structure containing sub-structures. Unfortunately, the sub structures automatically get renamed to "qc_Structure.xx" where xx is the sub-structure number. This is very annoying and i hope this issue will be solved in the near future. (or maybe i'm doin' something wrong ?)

Parallely, i need to access many of these files. Any advice on how to make a global structure of all the files at once ? Ideally a directory scanner that accepts any type of files would be uber-awesome.... and spare some noodling. Any thoughts ?

EDITED: i'm currently using a Queue patch to pack all differents structures into one big file. This does the trick, but still, a Directory Scanner that can catch plist generated files would be more versatile --- allowing to edit files independantly ---

cwright's picture
Comme vous voulez

I've been planning on a modification to the directory scanner to add a few more types (directories only), an "any" type, and a controllable input type (where you define the input UTI via a string port). Are there any other features it needs or might need?

substructures are named as such because they usually don't have names, and you can't save a dictionary with a nameless-key (in fact, you can't even add a nameless key...), so "qc_Structure.xx" is a dummy placeholder to work around that. I can try to modify it to preserve names (it needs some other name-handling tweaks too, since the XML Downloader output still causes it to die) in a future update.

franz's picture
SuperD Scanner and preserve name

Super Directory Scanner that scans anything you specify is overkill.... i guess it will suit all my future possible needs (like scanning a folder full of .FBX 3D models...) ;)

Please do try to modify structure saving behaviour so that is preserves names. Right now (although i can handle it) all sub-structs are named qcStructure_xx , even sub-sub-sub-structures (which i have, since i need to keep everything in one file), so it is a bit messy conceptually.

Anyway, this is a really usefull plugin, that is actually saving me hours of dreadfull work (= entering the values manually into a javascript) Thanks for this great release

mfreakz's picture
A real Browser

Hi there, I would be very interested in a "New Directory Scanner" too... For me, it's a bit different, i would like to use this "new Directory Scanner" patch to browse files and navigate into folders. The matter is that the actual patch doesn't list folders into the structure. It could be great to choose "any" type of file, and i think it could be useful to list folders too.

In fact, i think we need a real new patch, a "Browsing Patch".

It could be great to make such a "little finder like" environnement, "3D file browsing !" or frontrow like applications... Having a full and complete "Browsing Pacth" could open a large variety of interactive applications.

I think about: Indexed navigation (with auto refresh). Trigger input to enter, list and browse sub folders.

Upgrading Directory Scanner could be great and very useful for many projects.

franz's picture
advice ?

any advice on a way to merge 2 plists together ? Would you recommend any kewl little app to hand edit and merge these files ? Apple's Plist editor is not that friendly and opening the file in Textedit shows trash data. thx

EDITED: i found PlistEditPro , which is very nice and allows copy pasting of plist elements (QC structures). Sorted. Any thank you very much for the new Directory Scanner. Very usefull.

smokris's picture
xml or binary

franz wrote:
opening the file in Textedit shows trash data.

plists can be stored in 'xml' or 'binary' format. Apple provides a commandline utility to translate between the two:

plutil -convert xml1 whatever.plist

franz's picture
thxx

thanks a lot smokris.

Installation Instructions

Place the plugin file in
/Users/[you]/Library/Graphics/Quartz Composer Patches/
(Create the folder if it doesn't already exist.)

The FileTools plugin includes several patches for File Input and Output, as well as structure loading and saving.

  • File Info - provides information about a file, such as its size, type, and creation date.
  • File Type - Provides the UTI of a specified file.
  • String With File - Reads a file's contents into a String.
  • String With URL - Reads a URL's contents into a String.
  • Structure From File - Reads a QCStructure from a plist file.
  • Structure To File - Saves a structure to a plist.
  • Text File Writer - Saves a string to a file.
  • PDF Renderer - Display a PDF file.

Source code is available from GitHub.