On 07/10/2015 at 16:53, xxxxxxxx wrote:
Hi Guys!
I am trying to get a new project start up with MINTIME and MAXTIME to set at different numbers in the project settings and for a example my plugin S.O.E.
Example:
#-----| Documents_U.N.I.T.S_Function |----------------------#
def UNITS_FUNCTION(self, unit) :
global fileSeparator
doc = c4d.documents.GetActiveDocument()
if doc == None:
return False
# Set project scale
unitScale = c4d.UnitScaleData()
unitScale.SetUnitScale(1.0, unit)
bc = c4d.BaseContainer()
bc[c4d.DOCUMENT_DOCUNIT] = unitScale
doc.SetDocumentData(c4d. DOCUMENTSETTINGS_DOCUMENT, bc)
return True
#---------------------------------------------------------------------------#
####-F.U.N.C.T.I.O.N.S->>>>########
#--------------------| M.E.T.E.R.S_(ID_M) |--------------------##
#If meters in the Getlong-(ComboBox) is selected then Execute Meters Fromats.
def DAE_1_4_Format_M(self) :
c4d.CallCommand(100004820, 100004820) # Copy
c4d.CallCommand(12094, 12094) # New
c4d.CallCommand(self.UNITS_FUNCTION(c4d.DOCUMENT_UNIT_M)) # <<----call out for Documents U.N.I.T.S Function
c4d.CallCommand(100004821, 100004821) # Paste
c4d.CallCommand(60000, 5) # Export Filter for DAE 1.4 in R16 and r17
#This how I to close a DOCUMENT with out asking.
doc = c4d.documents.GetActiveDocument()
if doc == None:
return False
c4d.documents.KillDocument(doc)
So now i am trying this:
bc = c4d.BaseContainer()
fps = doc[ c4d.DOCUMENT_FPS ] = 30
minTime = doc[ c4d.DOCUMENT_MINTIME ].SetNumerator( 40 )
maxTime = doc[ c4d.DOCUMENT_MAXTIME ].SetNumerator( 78 )
doc.SetDocumentData(c4d. DOCUMENTSETTINGS_DOCUMENT, bc)
It dont work!
Feel free to share your ideas or tips,
Cheers,
Ashton