On 30/06/2018 at 06:09, xxxxxxxx wrote:
Hi Sebastian and Eldiren,
I found the comment on this post VERY interesting to me. I'm trying to replace a current material for a new created one (avoiding to do the replacement in all the Tags). As far as I understand, you suggest that we can replace the material connections using the TransferGoal function.
this is how looks that portion of the code in my script... you think am I doing right? not working at the mo.
#iterate over native C4D materials
matLoop = doc.GetFirstMaterial()
while matLoop:
if matLoop.GetType() == c4d.Mmaterial:
print matLoop
oldmat=matLoop
newmat=ConvertMaterial(oldmat)
oldmat.TransferGoal(newmat,False)
matLoop = matLoop.GetNext()
I can't find any other example of this through the Internet :)))
Eldiren, I would be so amazing if you can share the portion of code you finally managed to do the task!
Thanks in advance!
Julio.