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.
Boony2000
@Boony2000
Posts made by Boony2000
-
RE: Error reading resource Line 1
-
Error reading resource Line 1
Hi everyone!
I am currently in the process of moving a plugin into a new environment and starting a very reduced version of it up gives me an error on startup:
Error reading resource file '[PLUGINDIR]\res\c4d_symbols.h' Line 1
I am still on R20, in case this is relevant.
I am a little stumped as to what this error is trying to tell me, since the first line of the file are just comments and even if I only put a dummy element in there the error appears (even though the plugin then breaks).
I am confused as to why the plugin seems to run fine after I click ok, since the file contains the pluginIDs necessary to register the plugins. How do I get rid of that error message?I don't know if this is related at all, but I also always get this in the maxon console:
ZeroConf error: Couldn't get bonjour version [sys_bonjour.cpp(1726)] Warning: Team Render is deactivated in -parallel mode [...] ZeroConf error: Couldn't get bonjour version [sys_bonjour.cpp(1726)] ZeroConf error: nullptr CRITICAL: Stop: Current take is nullptr document data could be corrupted [takemanager.cpp(499)] CRITICAL: Stop: Current take is nullptr document data could be corrupted [takemanager.cpp(499)] Optout defined by Installer / Updater.
It's probably not related, but in case it is I thought I'd mention it.
-
RE: Output all renderpaths
Thanks Maxime!
In the mean time I will cycle through takes, AOVs and Frames manually to get the paths.
-
Output all renderpaths
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!
-
RE: Prevent c4d from opening path passed in sys.argv
Thanks! I'll try that.
-
RE: Prevent c4d from opening path passed in sys.argv
Hi Maxime!
Thanks for your answer.
Is there a way to directly get that variable in Cinema, or is it basically just modifying the string into something that isn't recognized by Cinema? For me it looks like I now have to seperate the string by finding the '=' or something like that. Is that what I have to do? -
Prevent c4d from opening path passed in sys.argv
Hi!
I want to do pretty much what was proposed in this thread. That is passing a script via sys.argv.
It seems that Cinema is trying to load the file after I'm done with my stuff and since it doesn't recognize the filetype I get an error "Unrecognized file format!".
I tried consuming the path with sys.argv.remove(path), but that didn't really seem to do anything.
How can I prevent Cinema from attempting to open the path?Thanks!
-
RE: Preventing SetDocumentData from switching to active tool
I'm just going to go ahead and mark this as solved.
Either using an empty Basecontainer or the set function solve the problem.Thank you for explaining!
-
RE: Preventing SetDocumentData from switching to active tool
Interesting. What I was doing is this:
doc = c4d.documents.GetActiveDocument() fps = 25 docSettings = doc.GetDocumentData(c4d.DOCUMENTSETTINGS_GENERAL) docSettings[c4d.DOCUMENT_FPS] = fps doc.SetDocumentData(c4d.DOCUMENTSETTINGS_GENERAL, docSettings)
Which does cause the problem even if directly entered via the python console.
I don't know why that is bad exactly. At this point I was only changing the FPS, at another place a bunch of other stuff. It seemed logical to do it this way. Is using the get/set functions the better way to do that? -
Preventing SetDocumentData from switching to active tool
Hi!
I am trying to change some stuff in reaction to the user changing settings.
To do that I catch c4d.EVMSG_CHANGE and change some document settings via SetDocumentData.
The problem I encountered is that SetDocumentData seems to switch the attribute editor to the active tool after it's done.
That means I can't get to any other attributes, because e.g. selecting an object triggers SetDocumentData and switches back from the object settings to the tool.Maybe c4d.EVMSG_CHANGE is a little overkill to detect changes, but I don't know a better way.
How do I stop SetDocumentData from switching what is shown in the attribute editor?
Or if that's not possible how can I change something like the document framerate in reaction to something the user does?Thanks