Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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
On 08/10/2015 at 01:57, xxxxxxxx wrote:
Hello,
to change the document settings you have to actually assign a new value to the parameter and not just edit the returned value. Something like this:
doc[c4d.DOCUMENT_MINTIME] = c4d.BaseTime(10, 30)
best wishes, Sebastian
On 08/10/2015 at 08:43, xxxxxxxx wrote:
It works and thanks man. But the next thing is how can fix this i want to Copy the object that is in side the linkbox plz.
self.lnk_source = self.AddCustomGui(UI_LNK_SOURCE, c4d.CUSTOMGUI_LINKBOX, "", c4d.BFH_SCALEFIT, 50, 10, self.rootLinkBaseContainer)
if id == Verify_fbxBT: #gui.MessageDialog("This feature is Still IN Development!", c4d.GEMB_OK) doc = c4d.documents.GetActiveDocument() fps = doc.GetFps() #------------------------------------------------------------------ #how i fix this! get it to Copy what is in thelink box self.lnk_source.GetLink() doc.GetActiveObjects(UI_LNK_SOURCE) #------------------------------------------------------------------ c4d.CallCommand(12094, 12094) # New doc = c4d.documents.GetActiveDocument() unitScale = c4d.UnitScaleData() unitScale.SetUnitScale(1.0,c4d.DOCUMENT_UNIT_M) bc = c4d.BaseContainer() bc[c4d.DOCUMENT_DOCUNIT] = unitScale doc[c4d.DOCUMENT_MINTIME] = c4d.BaseTime(self.GetLong(UI_FRAME_FROM), 30) doc[ c4d.DOCUMENT_MAXTIME] = c4d.BaseTime(self.GetLong(UI_FRAME_TO), 30) doc.SetDocumentData(c4d. DOCUMENTSETTINGS_DOCUMENT, bc) c4d.CallCommand(100004821, 100004821) # Paste
On 08/10/2015 at 09:07, xxxxxxxx wrote:
for questions no longer related to the thread's original topic please open a new thread. Thanks.
Best wishes, Sebastian