THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2011 at 02:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : PYTHON ;
---------
Hi everyone this my first post i try use in plugins.ObjectData i want take the doc becuase i want take the time frame in this example `` i know this dosen't work correct ``class MyMain(plugins.ObjectData) :
def GetVirtualObjects(self, op, hh) :
**doc=documents.GetActiveDocument()** # <- maybe need change this ? Time=doc.GetTime() Frame=Time.GetFrame(doc.GetFps()) print Frame if Frame==0:return c4d.Ocube `` if Frame==10:return c4d.Ocone
` if Frame==20:r
:return c4d.OSphere
return None
the problem is here ``doc=documents.GetActiveDocument() dosen't work correct in render
i think i need something like this to use **
ObjectData. AddToExecution( _self_ , _op_ , _list_ )
ObjectData.Execute`( self , op , doc , bt , priority , flags )**
here i have doc :)
but i don't know how to use this
any idea ?
Thank you