You wont, its maya API not mr api, or mayatomr api (likeisw it would be so nice if maya api would cover all software in the world but it does not
)
Thets whet geometry shaders, and custom mi text is for. Thing is the mr render is 2 part. Export and render. Theres no way you can launch anything of maya inside the render however the custom text is part of the export phase so whatever you want to output push it to mi text node,
Anyway you dont need prerender mel for any mi export stuff, ist just for events into your maya nodes. (maya nodes know nothing of mr neither does maya API)
QUOTE
seeing as this is the api forum i was looking more for an api solution.
It does not matter maya api does not exist as far as mr is concerned. Well thoretically the mr shader could be bound to may api and mine maya at that part however you couldnt really use such code very widely.
QUOTE
one of my geometry shaders without having to hog the prerenderMel slot
just attach the geometry shader to your shapes slot and you can act on it like any other node (except array slots dont export right maybe in maya in 2009, tough you can circumvent this with extra add anim curve here slot if you do indivdual per array value connections, whole array isnt exported right again you could allways use custom text nodes for this just put a command that generates the mi stream into the node) But yes the maya to mr factory exporter leaves much to be desired. Search your manual on Dynamic Attributes.
Anyway theres nothing you could really need beyond this! I mean all the data the geometry shader would need could be inputted trough the geometry shaders input slots. (with the array to array connection caveat, wich works wrong in 8.5 half right in 2008, in 7.0 no chance write custom text)
Read the following manual entries:
Dynamic Attributes, here especially "miMaterial"
Custom text nodes, this is the inferior maya 8.5 version upgrade to maya 2008 and you get mel into text placeholders for export time. Soo make sure you upgrade to maya 2008 you get this insetad
So really the exporter leaves a lot to be desired.
QUOTE
was hoping that since software render has an api callback i'd be able to find an api callback for other renderer's as well.
It would be to late in anycase.