On 09/01/2018 at 07:00, xxxxxxxx wrote:
I have an object generator plugin with a button only one button, that should create any material other than standard(banji, hair, nukei, fog, etc.), but it always creates standard material.
class Testplugin(c4d.plugins.ObjectData) :
def Message(self, node, type, data) :
if type == c4d.MSG_DESCRIPTION_COMMAND:
if data["id"][0].id == TESTPLUGIN_VALUE:
material = c4d.Material(1017730)
doc = c4d.documents.GetActiveDocument()
doc.InsertMaterial(material)
return True