Reading material parameters
I am trying to read the parameters of a material using the rib() function in a tool script, but I keep getting an error. Am I accessing the values correctly in this snippet?
I am trying to read the parameters of a material using the rib() function in a tool script, but I keep getting an error. Am I accessing the values correctly in this snippet?
Code:
var document = tool.document();
var count = document.materialCount();
for (var i = 0; i < count; i++) {
var material = document.materialAtIndex(i);
print("-------------------------");
print(material.getParameter("name"));
print(material.rib());
}
error: 'undefined' is not a function (evaluating 'object.rib()')