wrong arguments 2003-11-28 - By deane@(protected)
Back On Fri, Nov 28, 2003 at 10:49:22AM +0100, "Horv?tth Szabolcs" wrote: > > I have a mel script problem that is related to some 4.5 and 5.0 MR > rendering process changes. My script calls two different procedures for > the old and new maya versions by querying the version. The problem is > that the mentalrayPreviewRender process definition of 5.0 is different > than 4.5`s so when the script is sourced under maya 5, it just spits out > an arror message: [...] > The question is, how can I keep the two commands in the same script, to > work ok with both versions? [...] > if (`substring $version 1 1` == "4" && $renderer == "mentalRay") > mentalrayPreviewRender 4 ""; > else > { > if (`substring $version 1 1` == "4") > renderWindowRender renderRegion renderView; > else > renderWindowRenderRegion renderView;
Place the command in a string and execute it using eval():
if (`substring $version 1 1` == "4" && $renderer == "mentalRay") eval("mentalrayPreviewRender 4 \"\""); else [...]
=========================================================================== - deane Gooroos Software: Plugging you into Maya
Visit http://www.gooroos.com for more information
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|