When converting objects in bulk, i run into a problem with R23.
The Code in which it crashes:
for objectList in objectLists:
try:
commandCount += 1
result = c4d.utils.SendModelingCommand(
command = c4d.MCOMMAND_MAKEEDITABLE,##CMD.MAKE_EDITABLE
list = objectList,
mode = c4d.MODELINGCOMMANDMODE_ALL,
doc = doc,
flags = c4d.MODELINGCOMMANDFLAGS_CREATEUNDO # if this flag is not set the method will delete all affected objects from the list and return them
)
LogWithTimestamp(commandCount * objectsPerCommand, " items of ",len(allObjects)," made editable", LogLvl.DEBUG)
etc.
I add the crash report zipfile. I have no idea how to fix it, though it seems to be a kind of stackoverflow..
_BugReport.zip
I reduced the number of objects converte to narrow down what crashes the script. It blows up during the conversion of a Circular Object called "Kreis" which is a inner Object of a oSweep Object.
[2022-11-17 17:11:36.519321] 8 items of 56 made editable
[2022-11-17 17:11:36.529534] ObjectName:Kreis
[2022-11-17 17:11:36.529534] ObjectName:Innenschirm
[2022-11-17 17:11:36.539614] <c4d.documents.BaseDocument object called with ID 110059 at 2240546111104>
[2022-11-17 17:11:36.549779] [<c4d.SplineObject object called Kreis/Spline-Objekt with ID 5101 at 2240546107136>, <c4d.PolygonObject object called Innenschirm/Polygon-Objekt with ID 5100 at 2240546108160>]
Traceback (most recent call last):
File "C:\Program Files\Maxon Cinema 4D 2023\plugins\vuframe-aura-commandline.pyp", line 267, in ValidateModelSizeMakeEditable
result = c4d.utils.SendModelingCommand(
AssertionError: the passed document must match the object's document.
During handling of the above exception, another exception occurred:
I tried to work around the problem, by preconverting all oSweeps and oLathes, but even then once the script hit the circle Spline Object, it errored out in send Modelling command.
If i convert a complex object, i guess i must clean up below.
Still should just convert to a polygon circle then.
Have a nice evening.