Its really down and dirty right now but it works. VERY MINIMAL TESTING TOO. So don't go crazy on me if something breaks. I am going to work on making it easier to setup too but for now, it will work in a pinch. There's your disclaimer.
Also, be sure to open a fresh scene of modo with the octane viewport closed, otherwise you will get an error.
in the #Opens the scene line, you need to set the name of the project file and
lx.eval("scene.open {C:/Users/-----/Desktop/Temp/cbe.lxo} normal") <--- Change that to your first project file. IF YOU COPY AND PASTE FROM WINDOWS EXPLORER BE SURE TO CHANGE THE "\"'s to "/"s.
#Renders current scene be sure to change the file type here "png8" to whatever you want it to be. Then also where you want to write the file to and file name. Once again change the \ to /.
lx.eval("octane.renderAndSave png8 {C:/Users/-----/Desktop/testing/untitled.png}")
Then just copy and paste for more and more scenes. BUTTTTT in the second section of code, be sure to not include the code -
#Opens Octane Render Viewport
lx.eval("octane.openViewport")
Because the viewport will already be open. So when you copy and paste either take that out, or just use what I have because its already out.
And thats it, its pretty simple, especially if you save as the scenes to a single location, then you can easily copy and paste the scene locations.
Like I said, I haven't done much testing. But it uses mostly octane commands that are preset and work well.
My next step is to include animation into the code.
And my disclaimer again - I am no means a coder by any stretch of the imagination, this is my first script and it actually solves a very large problem for me, so I will hopefully stick with it and make this better.
Also, another thing that I found great is, this is opening in the background and a progress bar pops up for the rendering status in samples. I am sure Paul knows why this is, but its super awesome, because it doesn't take time to open the scene. I have no idea how that works though, but its awesome
.
Next step is to include a line of code for animations to work in tandem with stills. I will report when I finish it, ha, IF I finish it without pulling my hair out.
Enjoy!
HERES THE FINAL CODE TO ADD MORE COPY AND PASTE THE SECOND BLOCK OF CODE!
#Batch Rendering Script
#Opens the scene
lx.eval("scene.open {C:/Users/-----/Desktop/Temp/cbe.lxo} normal")
#Opens Octane Render Viewport
lx.eval("octane.openViewport")
#Renders current scene
lx.eval("octane.renderAndSave png8 {C:/Users/-----/Desktop/testing/untitled.png}")
#Close current scene
lx.eval("scene.close")
#Next Render
#Opens next scene
lx.eval("scene.open {C:/Users/----/Desktop/Temp/longer.lxo} normal")
#Renders - Viewport is already open from first render.
lx.eval("octane.renderAndSave png8 {C:/Users/----/Desktop/testing/longer.png}")
#Closes Current Scene
lx.eval("scene.close")