Laurent Crivello
Laurent Crivello

Reputation: 3931

Retrieving color of maya shader in api

I am retrieving shaders in maya c++ api using

fn.getConnectedShaders(0,shaders,indices);

shaders is an MObjectArray containing each shader of the selected object. How to extract the ambient color and other attributes from the shader MObject ?

Upvotes: 1

Views: 340

Answers (1)

Dave
Dave

Reputation: 356

Look into the existing plugin code. \devkit\plug-ins\D3DViewportRenderer.cpp, it extracts the "ambientColor" and other attributes.

Upvotes: 3

Related Questions