QCMeshTools/QCMeshValidate

Super duper alpha stuff - as in, I should let this rest a few days and see if I can add in some more patches with extra functions (maybe bounding box stuff, and some other useful things?), but I'm excited about it since it's the first non-Apple patch that does anything with QCMesh that I'm aware of.

I've made a "QCMeshValidate" patch that's somewhat inspired by Snow Leopard's Image Validate patch, but was mainly a proof of theory effort in making a 3rd party patch that does stuff with a QCMesh port.

If you hook up a valid QCMesh to the port, it should return an index value of 1. If not, you will get an index of 0. This serves the function of indicating whether a valid QCMesh is connected to the input port of the patch.

Don't get too excited about the fact the main patch you'll install (should you so choose to accept the mission) will be called QCMeshTools.

I've named it this so that if I come by anything else useful, it makes it easier to add to the project without having a ton of separate patches for people to have to install; new patches can just get updated to the main QCMeshTools, and nothing will break for the user (unless I go crazy with rejiggering).

Right now, all that you will see in your patch list is QCMeshValidate, which is a really simple utility indeed, though I can think of a few scenarios where it would be useful. One cannot currently just hook up a Mesh Importer or other thing (kernel+ Mesh Creator) that generates QCMesh to a number/index/boolean or color port to generate a hint about if the current content is valid, so there could be something handy in having it available to use as a new patch.

I can think of a couple of ways of achieving similar function; getting vertices from a mesh port using the "Get Vertices" patch, while using whether or not an index gets returned with a Structure Count to derive a 1, but that requires multiple patches, and I may be wrong, but I could see it being less stable/efficient.

Since this checks the input type, and if it matches QCMesh returns the 1, the code is verrrry direct. This is just a straightforward, simplistic way of deriving this info. SL only of course, since QCMesh isn't available in 10.5 and previous.

This is a skanky patch/plugin, so install in Quartz Composer Patches.

...and thanks to anyone who deserves thanks on it :)

I've included an annotated sample composition to make it clear what's going on here.