On 19/01/2018 at 19:54, xxxxxxxx wrote:
Modeling Kernel Error constantly crashes C4D when I'm using MCOMMAND_MELT In object modifier plugin.
It generates tons of Error messages when I'm tweaking settings and then completely crashes C4D.
It works if I'm dropping object to modify under generator(e.g. Connect) and modifier after it.
I also tested it with Object Generator plugin and C4D's Python Generator and it works like a charm.
class Otopoformer(plugins.ObjectData) :
def Init(self, node) :
self.InitAttr(node, float,[c4d.DELTA])
node[c4d.DELTA] = 0.5
return True
def ModifyObject(self, mod, doc, op, op_mg, mod_mg, lod, flags, thread) :
sel = op.GetEdgeS()
sel.Select(1)
res = c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_MELT,
list = [op],
mode = 3,
doc = op.GetDocument(),
flags = 1)
return True
I think it will work if I'll send op into virtual Doc, perform modifications there and bring it back to the base document, but I never tried this with modifier plugins and I don't know a correct way of doing this.