Hi all,
I've created my own version of the TexAColor plugin that does some ray casting based on a locator point in the Maya scene. So basically, I want to set a plugin attribute to the position of the locator every frame.
I'm familiar with the 'Post Translate Python' functionality to send scene information to the Vray plugin during translation from Maya to Vray and I'm doing this as follows:
However, I'd like to update the 'locatorPos' attribute in the plugin every frame. There is the 'Pre Render Frame MEL' functionality but when I try to recall this code in that block or just update locPos and recall 'tex.set('locatorPos', vu.Vector(locPos))', Maya crashes with a generic 'cannot save blah.ma to temp directory' message. So something is wrong.
Perhaps I need to actually create a corresponding Maya plugin for this Vray plugin but I haven't investigated that path yet. Alternatively, what would be the best way to update Vray plugin attributes based on Maya scene elements per frame?
Thanks,
I've created my own version of the TexAColor plugin that does some ray casting based on a locator point in the Maya scene. So basically, I want to set a plugin attribute to the position of the locator every frame.
I'm familiar with the 'Post Translate Python' functionality to send scene information to the Vray plugin during translation from Maya to Vray and I'm doing this as follows:
Code:
import vray.utils as vu import maya.cmds as mc mat = vu.exportMaterial('lambert1') tex = vu.exportTexture('myTexAColor') mat.get('brdf').set('color_tex', tex) locPos = mc.xform('locator1', q=True, t=True) tex.set('locatorPos', vu.Vector(locPos)) nodes = vu.findByType('Node') nodes[1].set('material', mat)
Perhaps I need to actually create a corresponding Maya plugin for this Vray plugin but I haven't investigated that path yet. Alternatively, what would be the best way to update Vray plugin attributes based on Maya scene elements per frame?
Thanks,
Comment