@zipit Yeah, you're right. It's flaking out on me again. I'll keep messing with it. Thanks.
Solved Adding multiple cameras from a single file to the render queue
as said before, please approach the problem systematically, or otherwise we won't be able to help you:
- What are the console error messages in such faulty scenes?
- What is the error status of the render queue manager after you ran the script?
- Are there any noticeable problems when you do print out the camera objects and document paths my script does generate?
- Does each saved file have a different camera selected?
- Does the queue manager properly reflect these camera selection?
- Do you have write access to the path where you want to render the animations to?
- Do you have write access to the path where you want to save the documents to?
When you have crossed of all these, I would start removing systematically "features" from the scene. Starting with plugins,
then render data (a.k.a. settings) and finally scene objects to pin point the problem.
- It's not failing, so there are no error messages.
- It adds one render item for every camera in the scene, but the cameras in these render items, instead of each being a different camera, are all set to whatever camera was the active camera before I ran the script.
- I'm not sure what you mean by this, but other than the issues I've mentioned, I haven't noticed any other issues.
- Yes. So each file is being saved with the proper camera selected, but it's not being queued that way for some reason.
The scene I'm using is the example scene you sent me. The ONLY difference between whether or not the script works is if I have an active camera set before I run the script. I've even added this line of code at the beginning of your script to try to foolproof it, but it doesn't seem to work.
It seems it's behaving more stable now, and the script consistently works correctly if I make sure to unset the active camera manually before running the script, but obviously if we can get the script to work without that manual condition, all the better. I understand that it makes no sense on your end that the script working would hinge on this, but I can't think of any other difference between the times the script works and when it doesn't.
Are you not able to recreate this same issue on your end with your script and your document? Could it be a version issue? I'm on Windows 10, currently testing R23.110 build RB330286.
yes, I am on R23.110. I did test it on Windows and I just reran successfully the script for good measure. Regarding point three in my previous posting, I meant that you should print out the camera objects and file paths the script does generate for you and check if they "add up". So when you say that the files have the correct cameras activated, but the render queue manager does not, that is rather puzzling:
- Just to understand this correctly, the renders go through for you, right? You get the little green traffic light signals in the render queue, not the red ones, indicating an error?
- Have your tried clearing the render queue and then adding the files manually to see if the manger still shows the wrong camera?
- Since you did use my file, the render settings and the scene objects can be eliminated as possible causes, but I still would recommend removing all plugins to test if they are the reason for your problems.
- Yeah, the renders all go through. The "R" column is all green.
- Manually adding the cameras from the original file renders the corrects cameras. So does adding the cameras from the documents your script created. But interestingly, when I opened those files, and found the right cameras selected in each one, I added them to the render queue, and it queued up the wrong camera. It wasn't until I changed the active camera to a different one, and then reselected the correct camera that it queued up the right camera when I manually added it with the Render Queue's "Add Current Project" button.
- I haven't installed any plugins in this iteration of c4d.
I was able to reproduce your problem with the file you did sent us. The problem seems indeed to be connected to the fact if the document has a user chosen camera or just the editor camera. This behavior is most likely a bug - I am not sure though yet what conditions do make it appear and what not, as I was also now able to reproduce it with my file. I will report back when we have any further news.
so I heard back from the devs now and:
- This is a bug unrelated to Python, as I was able to reproduce the faulty behavior just in Cinema 4D.
- The bug has been fixed and the fix will be published with one of the next service updates of R23 (I cannot guarantee though that it will be the upcoming update).
- For now there is not much to do for you, since the bug is related to Cinema's take system and there is not much you can reasonably do to prevent it from happening.
So the only thing for you to do at the moment is unfortunately to wait for the update. You could technically try use
RenderDocument or the
NetRenderService to basically create your own render queue, but that would be of course a lot of work and also outside of the scope of the solutions we can provide here for you; but we will be happy to answer any questions you might have when you need and immediate solution and choose to take that route of implementing your own render queue functionalities.