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).
I am trying to register multiple plugins that are instances of the same class, but do slightly different stuff (in this case construct different menus). I am getting some external data that I would like to put in a dictionary with the plugin ID as keys. I could then get the correct data set for each plugin by comparing the pluginID from e.g. within execute with the pluginIDs in the dictionary. But for that I would need a way to retrieve the pluginID of the class instance whose execute function was called.
Edit: I figured out a way. I can pass the pluginID when initializing the plugin in the register function and save it as a class member in __init__
__init__
Not that this is any help, but I'm currently also looking into some other memory leak issues and I get the same leak when running a clean Cinema R20.026.
Just to follow up, what Maxime suggested worked perfectly. No more cheating, basically just
c4d.StopAllThreads() dialogThread.Start() dialogThread.Wait(True)
Hi!
Is there a way to output all renderpaths? Perhaps via the token system?
I tried setting up the token system to get to the render paths, but it seems to me, like it is basically the same as building your own string replacement. You still have to manually input all the relevant stuff in to the dictionary, am I wrong? If only something like $take is used that might be handy, but if you are e.g. trying to output all paths that have tokens like $take, $pass and $frame and you have to cycle through them manually changing the values in the dictionary then that's not really more practical than just searching for the token string and replacing it.
Am I missing some great functionality of the token system that would allow me to just print all the render output paths?
Thanks!
After a LOT of testing around I finally found the culprit. The header file was encoded UTF-8 with BOM. I finally figured it out after noticing that two versions of the header file that worked or didn't work had a 3 byte difference in file size. No idea how that snuck in there, but now it finally works. Also now it makes sense that the error was pointing to line 1.
I ran everything again, and the examples as well as my own plugin built correctly now. I guess there were still some files missing, that showed up now. Thanks everyone!
Yes, I installed Visual Studio 2019.
Hi there!
I am trying to complie a plugin for R25, but am getting an error about missing .hxx files.
Error C1083 Cannot open include file: 'simplemesh1.hxx': No such file or directory
I am wondering if that is because I used the wrong project tool. The Maxon Developers Page links to the S24 project tool under the R25 headline. Is that correct or should there be a different tool linked?
How come there is no enum desciption for the constraint tag? The ID is 1019364 and the name should be c4d.Tcaconstraint, but it doesn't appear in any of the header files and it's not even listed on the tag types page in the documentation.
At some point the "Plugins" menu was renamed to "Extensions" and with it the ID of the actual menu. It used to be IDS_EDITOR_PLUGINS, but is now IDS_EDITOR_PIPELINE. Because of that c4d.gui.SearchPluginMenuResource() doesn't find it anymore without specifiying the identifier.
IDS_EDITOR_PLUGINS
IDS_EDITOR_PIPELINE
c4d.gui.SearchPluginMenuResource()
The default value (or even the function name) should probably be updated to reflect the change. (Or for the time being maybe just give a warning in the documentation?)
Alright, will do. Thanks!
I implemented the render progress callbacks as explained in the documentation for RenderDocument() to print updates to a commandline render and it seems the callback doesn't work for Redshift renders. Instead of c4d.RENDERPROGRESSTYPE_DURINGRENDERING the function gives c4d.RENDERPROGRESSTYPE_AFTERRENDERING for every call.
c4d.RENDERPROGRESSTYPE_DURINGRENDERING
c4d.RENDERPROGRESSTYPE_AFTERRENDERING
There is also some funky formatting going on at the bottom of the documentation entry.
Thanks for the info!
The documentation for c4d.utils.SendModelingCommand states
c4d.utils.SendModelingCommand
doc (c4d.documents.BaseDocument) – The document for the operation. Should be set if possible. Must be set for MCOMMAND_JOIN [...]
But this code for example works fine:
splineA = c4d.BaseObject(c4d.Osplinecircle) splineB = c4d.BaseObject(c4d.Osplinecircle) splineB[c4d.PRIM_PLANE] = c4d.PRIM_PLANE_XZ null = c4d.BaseObject(c4d.Onull) splineA.InsertUnder(null) splineB.InsertUnder(null) splineC = c4d.utils.SendModelingCommand(c4d.MCOMMAND_JOIN, [null], doc=None)[0] doc = c4d.documents.GetActiveDocument() doc.InsertObject(splineC)
Is there a specific reason you should have a document to do that operation in?
On a side note it would be really helpful if the documentation stated that you need to have the objects in a null in order to merge them and not pass a list of the objects as you might think.
c4d.documents.CloseAllDocuments() always returns None. Is this a bug, or am I using it wrong?
c4d.documents.CloseAllDocuments()
None