On 13/05/2013 at 06:13, xxxxxxxx wrote:
If I try to load my plugin, I get the following error:
ReferenceError: the object 'c4d.documents.BaseDocument' is not alive
Here is my code:
import c4d
import os
import sys
from c4d import gui, plugins, bitmaps, documents, utils
PLUGIN_ID = 1000002 # Test ID
MY_BUTTON = 11005
global doc
doc = c4d.documents.GetActiveDocument()
def AddObject(doc) :
NewObject = c4d.BaseObject(c4d.Ocube)
NewObject[c4d.PRIM_CUBE_LEN,c4d.VECTOR_Y] = 100
NewObject.SetName('New Object')
doc.InsertObject(NewObject)
c4d.EventAdd()
-> After that AddObject gets called in another function.
Does anybody know what I am doing wrong?
Greetings,
Casimir Smets