PDA

View Full Version : vrayCreateProxy, Works in MEL, NOT in python?


Stellios
06-15-2012, 04:32 PM
select your objects and run in MEL

{
vrayCreateProxy

-exportType 1

-previewFaces $resolution -dir $dirname -fname $fileName" -overwrite 1;
}

Success!!



run in python
import maya.cmds as mc
mc.vrayCreateProxy(exportType = 1, previewFaces = resolution, dir = dirname, fname = fileName, overwrite = 1)


Fail!!!



WHY?????

NaughtyNathan
06-16-2012, 12:06 PM
vray is not a part of vanilla Maya, if I run your MEL it fails immediately with:
// Error: line 1: Cannot find procedure "vrayCreateProxy". //
I assume then that vray is a plug-in of some kind. If vrayCreateProxy is a MEL script then there will be no python equivalent, if it's a command then there will be, but the flag parameters may not be exactly the same. for example, dir is a python built-in command, which means it may not be acceptable as an argument label (dir=dirname)

It could be something as simple as this, but only a user with vray will actually be able to solve this without pure guessing.

Stellios
06-19-2012, 02:44 AM
yes i should have specified, thanks for the input. I wrote out a string and did an eval command for mel

wish vray would come with a command reference

CGTalk Moderation
06-19-2012, 02:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.