file location

.location attribute

dust's picture

i happened to notice this ".location" attribute show in some of my patches ? I'm not exactly sure how it appeared on its own, but i have been messing with opening a quartz file, reading some nodes and inserting attributes, nodes, and connections directly into the data tree patch at the serialized binary data level i guess you would say. regardless I'm not inserting the ".location" attribute from Xcode.

to replicate create a blank file, add a new attribute in the editors editor menu by selecting edit information, click plus then add .location to the property key and leave the class object as string, then edit protocol conformance select nothing but click done, and save the file. now open up the edit information window again and you will see the location property value populated with a url string of your compositions location.

now close the file and open it and go to edit info again ? the attribute is gone ? so add .location again this time just save the file and disregard conforming to protocol and open the edit info again and viola the url value string is populated again. so my question is where does the attribute go and is there a way i can access it in the editor with a patch like composition info ?

the composition info requires a url to work but says it also takes repository identifier as well ? i have opened a few repository patches and asked for the identifier but i always get a null return. the documentations say that a qccomposition class can not be subclassed and a set identifier method doesn't exist so another question would be how are you supposed to create an identifier ?

it would be nice to be able to access your files attributes via a unique identifier not necessarily from the repository but even that would be nice. the kineme document info i thought would be the solution which worked one time for me and ever since then i have that first original look up stuck as my file url no matter what file i am in or how many times i add new document info patches. so there seems to be bug in that patch or a ghost in my computer or both ?

so again how to keep the .location attribute to be persistent ? I'm thinking it would be extremely useful for me to make an add attributes plugin so custom runtime data could be saved right into a qtz file. it would be nice to know where the patch is and automatically look up the url. now i could add a manual url string input to the plugin of course but it would be nice for the file to know it is no matter what computer it is on and it seems or well obviously quartz has to know where the document is.