How to create Sketch Material

On 24/10/2016 at 23:40, xxxxxxxx wrote:

I'm drawing a blank, and missing something stupid, I'm sure.

How does one create a sketch material with python? I found all the attrs in moutliner.h, but I don't see how to create one from scratch. Could anyone point me in the right direction?

On 25/10/2016 at 04:56, xxxxxxxx wrote:

Hi,

unfortunately there's no constant defined for the ID of a Sketch material.
But it's easy to find out. Simply create a Sketch material and drag it to the input field of the Console window. "SketchMat" appears, simply add a .GetType(), press return and the ID is printed to the Console.
In this case it's 1011014.
So you can create a Sketch material like so:

mySketchMat = c4d.BaseMaterial(1011014)

On 25/10/2016 at 22:11, xxxxxxxx wrote:

Ha. I found that number out, but I was too tired and dumb to remember to Insert the Material after creating it. Thanks anyway!