[Closed] Accessing Mental Ray Material Rollout
Anybody know how I can load a simple contour shader into the ink and paint materials mental ray rollout through maxscript?
I was using this with no luck:
ComicMat = inkNpaint
ComicMat.mental_ray__material_custom_attribute.contour = Simple__contour ()
It seems like the interface isn’t there when you instantiate the ink n paint class. Whilst I’m not sure why exactly, adding the new material to the material editor and then applying it does work.
ComicMatA = InkNPaint ()
ComicMatA.mental_ray__material_custom_attribute.contour = simple__contour()
-- Unknown property: "mental_ray__material_custom_attribute" in InkNPaint:Ink__n_Paint
ComicMatB = InkNPaint ()
meditmaterials[1] = ComicMatB
meditmaterials[1].mental_ray__material_custom_attribute.contour = simple__contour()
InkNPaint:Ink__n_Paint
Simple__contour:Simple (contour)
It’s probably because the mental_ray__material_custom_attribute isn’t a property of InkNPaint, but of the material slot. can u dig it
Sorry for using your thread.
But i having some exact problems, with the mentalRay custom attribute.
I have a scene with say 50 materials in a multisub mat. And i need a script that runs true all the materials and add a contour shader to the mentalray connection. But it does not work when the materials is in a multisub mat.
Help please, otherwise may day will not be so fun connecting a contour shader to every mat in the scene.
/Greets
Daniel W
for i = 1 to meditmaterials[1].material.count do
(
sContour = simple__contour ()
meditmaterials[1].material[i].mental_ray__material_custom_attribute.contour = sContour
)
This should do the trick. You just need to make sure your mulitsub material is in slot 1 of the material editor then run this.