The only problem is, how do I tell whether the renderer (any in maya - software, hardware, mr) has completed a frame?
Well, there are lots of easy ways. (heres the short list form top of my head)
- put in pre/post frame/job/layer melscript that notifes you wneevere a frame is rendered.
- read the text stream maya batch prints when rendering, it contains info on progress (well in mentalray only if you enable progress messages). Should be pretty standard.
- modify the mel procdure that calls the renders to notify per frame (this is essentially the same as pre/post melscript but its hidden form the user)*
- monitor your disk, whenever maya finsihes a frame it starts a new file, notifications on disk access is easy. You can also detect if maya has hung if the file thats currently rendering hasnt been touched for a while. This has the added benefit of not actually needing maya at all so your program should translate to any application in jiff. Also it can detemine the actual prrecental prgress by looking what tiles are finsihed.
- make a shader that emits progress messages to your engine.
- Use tha same command port architecture for messages as maya uses, thisway you dont have to roll out your own.
(any in maya - software, hardware, mr)
well actually theres 4 of them built in software, hardware, mr and vector. But seriously you need to be able to tackle even more since maya has atleastfollowing additional options renerman for maya, turtle, vray. That can be bolted along with a myriad of other options.
I had a look at the API doc, couldn't find anything that would suit my needs?
Your reading the wrong docs. Maya api only deals with maya dg evelauation, mostly (some viewport and event stuff also) but rendering is a outside of maya job. Because it needs to support mentalray and other erdnerers which have thier own API's etc. So its actually a job for mel.
And no, please don't say it would be easier to buy Qube! or whatever. I don't have that option.
well may be however did you condiser that getting one would be cheaper than rolling your own, even if your situation is very convoluted they usually offer you a much easier to work with api/ script envirnement to work on. And indeed some of them are FREE OF CHARGE.
*on a related trick you can use the api to monitor launch and fill in the post pre melscripts.