On 30/08/2018 at 02:01, xxxxxxxx wrote:
Hi,
First off I'm new here, and also very new with python.
I'm trying to create a pretty basic material using python, but it seems not so easy.
I have two questions:
How can I add the Art shader to a channel?
It's not listed in the SDK shader list.
So it's probably not like I'm just missing the right word here, is it ?
> matt[c4d.MATERIAL_USE_LUMINANCE] = True
>
> Art = c4d.BaseList2D(c4d.X...something.....)
>
> matt.InsertShader( Art )
>
> matt[c4d.MATERIAL_LUMINANCE_SHADER] = Art
I also want it to load a image in the art shader, so I figured, why don't I just create a preset folder in the content browser and load the material form that folder.
Turns out it's quite tricky to import materials from the content browser too.
> fn = "preset://somefolder/Cube.2.c4d"
>
> c4d.documents.LoadFile(fn)
If I use anything else then LoadFile, it will tell me to use a base document in the console.
From my understanding, I have to make a virtual base document and then import it from that.
How does that look like in code ?
I only need one to work, but I am very interested in both!
Cheers,
Tim