In the mean time I will cycle through takes, AOVs and Frames manually to get the paths.
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! I'll try that.
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?
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?
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!
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?
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 for the input!
It's a shame you can't fiddle with the palettes. I think I'll just do it like x-particles and have a command that loads the palette and the user can dock it himself. Not the most elegant, but gets the job done.
Is it possible to have a command plugin insert an icon/button into the standard palette on startup?
I am aware that changing layouts would be something I would have to deal with seperately, but is it generally possible to do what you would normally do via the 'customize commands' menu from within the plugin code?