Page 1 of 1

MEL SCRIPTS

Posted: Fri Jun 19, 2015 2:22 pm
by Jolbertoquini
Hi Guys,

Just a question if some one know how to access option at the shader via Mel script set atribute and other mel language give me errors when I try to change value of specular , roughness and etc the preset Tab doesn't work after all .

EX..

blendAttr "Diffuse" 0.005 0.005 0.005;
blendAttr "Specular" 1 ;
blendAttr "Roughness" 0.005;
blendAttr "FilmWidth" 0.005;
blendAttr "FilmIndex" 1.460000038;
blendAttr "Index" 1.460000038;

Is really a big thing to make work this things when we have a pipe line of presets and we can't use. I know we have Live DB but we sould be abble to access into the shaders as the same way as the other shader in maya.

no one have the magic line of mel to make work???

Best
JO

Re: MEL SCRIPTS

Posted: Wed Jul 01, 2015 12:58 pm
by Wenneker
Unfortunately I can't seem to find a way to manipulate the shader values directly through mel. It gives the following error:
"The data is not a numeric or string value, and cannot be displayed."

As a workaround you can however connect an octaneFloatTexture or octaneRGBSpectrumTexture to the input and manipulate these with mel.

Code: Select all

//Create diffuseMaterial
shadingNode -asShader octaneDiffuseMaterial -name Name_Mt;

//Create floatTexture 
shadingNode -asTexture octaneFloatTexture -name Name_Ro_Tx;

//Connect the texture to the material
connectAttr Name_Ro_Tx.outTex Name_Mt.Roughness;

// Get / Set the value
getAttr Name_Ro_Tx.Value;
setAttr Name_Ro_Tx.Value .5;

Re: MEL SCRIPTS

Posted: Wed Jul 01, 2015 6:03 pm
by JimStar

Code: Select all

octane -help

Re: MEL SCRIPTS

Posted: Fri Jul 03, 2015 5:46 pm
by Jolbertoquini
Thank you Jim I've got also the same error but yes this possibility will be good enough thanks again! :D

Re: MEL SCRIPTS

Posted: Tue Jul 14, 2015 9:41 am
by Wenneker
cool.