MEL SCRIPTS

Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

Post Reply
User avatar
Jolbertoquini
Licensed Customer
Posts: 1067
Joined: Sun Aug 31, 2014 7:08 am
Location: London
Contact:

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
Octane Render for Maya.
https://vimeo.com/jocg/videos
https://www.linkedin.com/in/jocgtd
http://www.hmxmedia.com/
--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
Wenneker
Licensed Customer
Posts: 111
Joined: Mon Jun 02, 2014 4:12 pm

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;
Win 7 x64 | i7-4930 | 64gb | 4x gtx 780Ti 3gb
User avatar
JimStar
OctaneRender Team
Posts: 3812
Joined: Thu Jul 28, 2011 8:19 pm
Location: Auckland, New Zealand

Code: Select all

octane -help
User avatar
Jolbertoquini
Licensed Customer
Posts: 1067
Joined: Sun Aug 31, 2014 7:08 am
Location: London
Contact:

Thank you Jim I've got also the same error but yes this possibility will be good enough thanks again! :D
Octane Render for Maya.
https://vimeo.com/jocg/videos
https://www.linkedin.com/in/jocgtd
http://www.hmxmedia.com/
--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
Wenneker
Licensed Customer
Posts: 111
Joined: Mon Jun 02, 2014 4:12 pm

cool.
Win 7 x64 | i7-4930 | 64gb | 4x gtx 780Ti 3gb
Post Reply

Return to “Autodesk Maya”