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).
Thank you for the answer @ferdinand . Sorry for the decay of the follow up posts, im used to posting all attempted solutions, so that future readers have a guide.
We solved the problem by converting in a seperate Plugin call and it seems the legacy code im working on, "accidentally" reduced the context switch stale objects, by regularly re-storing the document refrence from a old reference kept in main. Your answers have been very useful and highlight important concepts developers should be well aware off. Thanks gain.
So, lets assume that a scene has complex dependancies. A generator depending on a splinewrapper, depending on a spline, depending on a oSweep, etc. etc.
How do i succesfully collapse such constructs to editable poly in a python script? My approach would have been to make a dependancy tree and then navigate from the leafs inwards.
But how do form that graph?
I know about about
objectInfo = obj.GetInfo() if objectInfo & c4d.OBJECT_INPUT:
But i need to know which Object is the parent of that Input. Or preferably, if there is a existing solution a pointer to that?
Or is there a sort of generic, generator dependency tree that can be traversed?
Regards FSS
Sorry, solved itself, the project path was not added to the jdk table file of pycharm. After that pycharm stopped doing this.
<additional ASSOCIATED_PROJECT_PATH="$USER_HOME$/LocalProjects/your/project/folder" SDK_UUID="0c6c6d76-ff0d-40a3-b9de-d6146d25c014"> <setting name="FLAVOR_ID" value="MacPythonSdkFlavor" /> <setting name="FLAVOR_DATA" value="{}" /> </additional>
Hi everyone,
hope you had nice holidays. im trying to follow the pyCharm setup, explained here and here: https://developers.maxon.net/docs/Cinema4DPythonSDK/html/manuals/introduction/autocompletion_dummy_package.html
https://plugincafe.maxon.net/topic/10961/how-to-use-c4dpy-for-cinema4d-r20-sp1/4?_=1673858332967&lang=de
The problem is, as soon as the Interpreter is called it seems to get stuck and start the interpreter over and over. Spamming my system with c4dpy instances in the background, with roughly a new one ever 3 minutes.
Anyone experienced similar problems?
Hi everyone, hi ferdinand,
simple question, is there a way to unify a objects normals (inward facing, outward facing) in code and flip them?
I know about the OLathe FlipNormals Boolean, but found that these is not a reliable indictor for inwards or outwards facing normals.
Is there a way to get the outwardness and inwarndness of normals (points majority towards pivot or away from pivot)..
And is there a modifier (sorry for the 3ds max term) that flips all normals for editables.
Merry XMas FSS
LegionLib_Release.dll: Legion::Mutex::lock + 0xc (SP: 0x000000379A5FF720, PC: 0x00007FFA368CF13C) Corona4D.2023_Release.dll: forcePluginDelayLoad + 0x1229cd (SP: 0x000000379A5FF750, PC: 0x00007FFA39D91F6D) Corona4D.2023_Release.dll: forcePluginDelayLoad + 0x1232fd (SP: 0x000000379A5FF7A0, PC: 0x00007FFA39D9289D) Corona4D.2023_Release.dll: forcePluginDelayLoad + 0x139f47 (SP: 0x000000379A5FF7D0, PC: 0x00007FFA39DA94E7) LegionLib_Release.dll: Legion::LowSystemMemoryChecker::`default constructor closure' + 0x90 (SP: 0x000000379A5FF870, PC: 0x00007FFA368F1CA0) KERNEL32.DLL: BaseThreadInitThunk + 0x14 (SP: 0x000000379A5FF8C0, PC: 0x00007FFAD5C674B4) ntdll.dll: RtlUserThreadStart + 0x21 (SP: 0x000000379A5FF8F0, PC: 0x00007FFAD6EC26A1) Registers
The counter part to the Mutex. Now looking into hot reloading the dll. If I dont return avenge me.
Hi, i have a crash of the corona plugin and the resulting callstack in your bugreport. So after reporting it to Chaos, i decided to investigate the whole thing myself.
Turns out the crash is during a FileRead for the Converter.logo in KernelLand in windows. Which should be easy to investigate with the
GetLastError()
if you have a minidump of the process. Which we have, thanks to bugreport not only consisting of x64 registers and stacktraces.
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile
So my question, were in the minidump attached to what dll is the error return value of the failed operation?
I assume its in the process block of the dll, but without source i can only guess. So can i get the hexadress of the position in the dump that corresponds to the error number.
To much coffee, to little sleep, so forgive the typos.
Regards Florian Seidl-Schulz
Hi manuel, thanks for the quick reply. It seems thats the source of most of my probelms. I tried to solve it with preconversion, that picks out specific objects and applies a conversion strategy, but this will become lots of boiler plate busy work, though it may be worth it for performance reasons. Trying the isAliveApproach now.
Same problem encountered with Ocasurface.
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.
Thanks alot Ferdinand.
I investigated some further and added the classes to the plugins list:
_plugins = [ "Tools", "Recipe",
The error was also caused, by the executables having different libraries. Meaning, we call once cinema 4d.exe, which uses the {prefs}/python39/libs folder.
The second part of the plugin is executed using the classic Commandline.exe and uses the {prefs}_x/python39/libs folder.
Im a idiot, but a stubborn one. Have a great day.
Topic can be locked now.