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).
@m_magalhaes Is there a way to get Cinema4D to update the object identifier ? When I import an alembic file, Cinema4D builds a hierarchy and all the paths recursively. Is there a way to tell Cinema4D to rebuild that hierarchy or is deleting and re-importing the only way to get the object identifier rebuilt ?
Hi,
I have difficulty keeping the label for a edit UI component on the same line with the following code. I want the FRAME_CHUNK_EDIT to the right of FRAME_CHUNK_LABEL
def CreateLayout(self) : ''' Frame Chunk size, Render folder prefix Frame range (start, end) ''' self.GroupBegin(id=1013, flags=c4d.BFH_SCALEFIT, cols=1) # self.GroupBegin(id=1014, flags=c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, cols=1) self.AddStaticText(FRAME_CHUNK_LABEL, c4d.BFV_MASK, name="Frame Chunk size") self.AddEditNumberArrows(FRAME_CHUNK_EDIT, c4d.BFV_MASK, initw=100) self.GroupEnd() # self.AddButton(SUBMIT_BUTTON, c4d.BFV_MASK, initw=100, name="Submit") self.GroupEnd() return True
Cheers
After calling MergeDocument()
merge_status = c4d.documents.MergeDocument(doc, path, c4d.SCENEFILTER_MERGESCENE | c4d.SCENEFILTER_OBJECTS)
I check merge_status to be true and wish to find some handle/name to the object associated with the call to MergeDocument(), how do I do that ?
I tried the following on an empty scene
doc = c4d.documents.GetActiveDocument() ao = doc.GetActiveObject()
that works if I am calling MergeDocument for a single path but if I am calling MergeDocument (in a loop) for a collection of paths, GetActiveObject() points to the same object, not the next one corresponding to the next path I am merging into the scene
I am troubleshooting a crash in C4D R21 commandline.exe on Windows 10
Error: application crashed C4DUnhandledExceptionFilter: writing exception info C4DUnhandledExceptionFilter: writing call stacks
Where are the likely place I can go to look at the exception info and call stacks that was being written out ?
We are using Arnold with C4D
While iterating the scene, we have found that one of the node (create via the ArnoldtoC4D plugin), the GetNext() method does not return the next object but itself, this resulted in an infinite loop iterating the scene.
Since we are now sitting between two different vendors, I am trying to narrow it down to who I need to follow up with regarding this issue.
>>> doc = c4d.documents.GetActiveDocument() >>> obj = doc.GetFirstObject() >>> print(obj) <c4d.BaseObject object called 'Arnold distant_light/Arnold Light' with ID 1030424 at 0x0000027ACD423D10> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423AD0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423FB0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423DF0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423AD0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423FB0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423DF0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423AD0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423FB0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423DF0> >>> obj.GetNext() <c4d.BaseObject object called '<display driver>/Arnold Driver' with ID 1030141 at 0x0000027ACD423AD0> >>>
@zipit There was a typo when updating to use the new IDs generated from Maxon, it has since been resolved and the plugins are loading.
I am currently using this approach to iterate the objects in a document
doc = c4d.documents.GetActiveDocument() obj = doc.GetFirstObject() next_obj = obj.GetNext() while next_obj: # Do stuff next_obj = obj.GetNext()
Is there some equivalent of doing this via e.g. indexing in a for-loop ?
I have generated the IDs from the site you recommended.
When I replace the plugin IDs with those generated from https://plugincafe.maxon.net/c4dpluginid_cp the menu would not even load.
I have a dialog button which hangs when I click it but it only hangs for a specific scene.
From looking at the printout in the python console window, it appears that when I click the 'Submit' button, it never reaches the call to Command()
TTR_PLUGIN_ID = 999121032 TTR_CANCEL_BUTTON = 12003 TTR_SUBMIT_BUTTON = 12004
def Command(self, id, msg): print('TurnTableRenderDialog::Command()') print('id = {}'.format(id)) print('TTR_SUBMIT_BUTTON = {}'.format(TTR_SUBMIT_BUTTON)) if (id == TTR_SUBMIT_BUTTON): print('TTR_SUBMIT_BUTTON')
def CreateLayout(self): ''' Frame Chunk size, Render folder prefix Frame range (start, end) ''' self.SetTitle('Submit turn table to Tractor (PlutoWithDamage)') self.GroupBegin(id=1013, flags=c4d.BFH_SCALEFIT, cols=1) # self.GroupBegin(id=1014, flags=c4d.BFH_SCALEFIT, cols=2) self.AddStaticText(TTR_COMMENT_LABEL, c4d.BFV_MASK | c4d.BFH_RIGHT, name="Comments") self.AddEditText(TTR_COMMENT_EDIT, c4d.BFV_MASK | c4d.BFH_LEFT, initw=400) self.AddStaticText(TTR_FRAME_RANGE_LABEL, c4d.BFV_MASK | c4d.BFH_RIGHT, name="Frame range (start,end,step)") self.GroupBegin(id=1015, flags=c4d.BFH_SCALEFIT, cols=3) self.AddEditNumberArrows(TTR_FRAME_RANGE_START, c4d.BFV_MASK, initw=100) self.AddEditNumberArrows(TTR_FRAME_RANGE_END, c4d.BFV_MASK, initw=100) self.AddEditNumberArrows(TTR_FRAME_RANGE_STEP, c4d.BFV_MASK, initw=100) self.GroupEnd() self.GroupEnd() # self.GroupBegin(id=1016, flags=c4d.BFV_MASK | c4d.BFH_RIGHT, cols=2) self.AddButton(TTR_CANCEL_BUTTON, c4d.BFV_MASK | c4d.BFH_RIGHT, initw=100, name="Cancel") self.AddButton(TTR_SUBMIT_BUTTON, c4d.BFV_MASK | c4d.BFH_RIGHT, initw=100, name="Submit") self.GroupEnd()
I am writing some scene assembly tool using C4D and c4dpy.
I am bringing in Alembic cameras and other geometry assets.
On the commandline.exe, there is no option to specify which camera I can render with so I am wondering if there is some python call I need to make to the C4D document before saving so that when I render the file, it knows which camera to use ?
Is there a call to c4d to ascertain if there are unsaved changes in the current session. The current session was started from opening a file from disk.
I am using R21 on Windows and using Python.
I read that I can get the RenderData object via
rdata = doc.GetActiveRenderData()
I see that frame range values are documented here
https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d.documents/RenderData/index.html?highlight=renderdata
RDATA_FRAMEFROM RDATA_FRAMETO RDATA_FRAMESTEP