On 27/01/2017 at 02:27, xxxxxxxx wrote:
In this post https://plugincafe.maxon.net/topic/9910/13352_get-base-object-input-id-for-link-fields&PID=52874#52874 Andreas describe a bit more how link are done in C4D.
And since I worked on a texture manager like.
I was wondering how the c4d one acutally know to which channel a bitmap is attached to.
Here is a quick test but it's only give me the name where the texture is linked not his canal.
import c4d def main() : mat = doc.GetFirstMaterial() desc = mat.GetDescription(c4d.DESCFLAGS_DESC_0) for bc, paramid, groupid in desc: if bc[c4d.DESC_SHADERLINKFLAG]: if mat[paramid.id]: print bc[c4d.DESC_NAME] main()
Moreover in this exemple this work from material to shader (is it possible to do from shader to material ?) I guess instead of passing a material and checking each link and then comparing with a shader, is it possible to get the parent of a linked shader(I guess no but cost nothing to ask)