If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Exciting News: Chaos acquires EvolveLAB = AI-Powered Design.
To learn more, please visit this page!
New! You can now log in to the forums with your chaos.com account as well as your forum account.
For some strange reason, I don't see vrayformaya.mll loaded. This would explain why the python script throws an exception (will fix this)... Is V-Ray actually loaded in Maya?
I just tried it again with vray loaded. BUT: I didn't mention that we load vray from a network repository, maybe that's the point. We set the necessary envvars before starting maya. (EDIT: Nope, tried it with a local install, same issue. /EDIT)
Ok, it won't work this way. You need to put the Python script in the V-Ray "Post-translate Python Script" field in the V-Ray settings. V-Ray will call the script automatically at the start of the rendering, when the scene is already translated for V-Ray and the SettingsOutput plugin is available.
Otherwise calling the script directly won't give you anything - V-Ray has not translated the scene yet (in fact, it's not even loaded).
(Nonetheless, it would be nice to have the way to get the name without rendering. I want to evaluate the name to pass it to our rendermanager. Maybe i can just translate the scene but not render it an catch the name that way.)
Sorry, if I'm spamming the forum a little bit too much with maybe noobish questions in the past days.
What I meant here, is that I want to use whatever a function in the posttranslate script returns in maya. So i get some values from the translated scene and use that for further processing internally in maya.
What I did as a workaround now: I printed the output to a tempfile and read that back in. Works for me.
Hm,
Probably you can use global variables or call a function/command, which does something (stores something in a global variable, uses optionvars or something like that).
But you've not told me what exactly do you want to do.
Would you like to explain the whole setup, so we can get some feedback if we can improve something in V-Ray?
Yes, of course, sorry. Basically I just want to get the resolved imagename of the image to be rendered. So tokens like <Layer> and <Scene> get resolved. Those will get parsed to the renderfarm manager.
So my first thought was, that I just can read it out from the vraySettings, like I can with mray/maya software. Then Vlado came up with the post-translate script which seemed pretty usefull to me. So I wrote a post translate script that does the things I've written before. But maybe I'm thinking way to complicated here. Maybe I should just resolve what I get from vraySettings.fileNamePrefix by hand and I'm done.
So, the goal was to get the output image names in order to pass it to the rendermanager. So we would be able to do some automated framechecking and stuff.
Comment