patch cable colours

strontiumDog's picture

hello i notice sometimes cables are yellow and sometimes they're orangy-red.

does anyone know why this is? it's not in the quartz composer guide. i'm suspecting it's when exact data types are supplied not as expected but i'm not definite.

thanks s

DanieleCiabba's picture
exactly, when its yellow you

exactly, when its yellow you are passing the same type of data that the port require... (orange i think works in virtual mode and red your dead... :)) maybe chris can say it better...

strontiumDog's picture
nice

yes i've been testing this and from looking at machinesdontcare et al you could be ok with orange cables so long as the patches you're using have some kind of logic to the values you're using.

cwright's picture
wikipedia!

I actually added this section on wikipedia earlier this week I think:

http://en.wikipedia.org/wiki/Quartz_Composer#Type_Conversion

That's the quick-and-dirty version -- let me know if it's still not clear.

toneburst's picture
I don't know if it's bad

I don't know if it's bad practice, but I often mix-and-match by passing the output of a boolean splitter, for example, to the Source Index input of a Multiplexer, or to a float input of a CIFilter or GLSL Shader patch.

Works fine for me, though I don't know if Apple are going to stop it doing so in some future update.

a|x

cwright's picture
it's good

Don't worry, those conversions are likely to always be around. boolean-to-index and boolean-to-number conversions are simple and cheap, I don't think it would be wise of apple to remove them (and we've not seen any indications that they would do so).

I even use image-to-boolean sometimes (if the image exists, it's true, otherwise, false) and image to index (no image = 0, image = 1) to drive multiplexers and logic all the time -- It's that way by design.