You can join Blender Studio for €11.50/month and get access to all of our training & film content instantly!Login Join Blender Studio
16th August 2017info License: CC-BY
This is the second video in a series of “tech videos” in which Sybren discusses concrete problems seen on Stack Exchange. This video is all about loading 10,000 individual OBJ files and rendering them to 10,000 images.
pathlib.Pathto access the filesystem
Slides are only visible to Blender Cloud susbcribers
Join to comment publicly.
15th April 2019 - 11:14
First of all thank you very much for making these wonderful tutorials These tutorials are very helpful.
I need some help from you to achieve some functionality.
I have tried loading fbx files and rendered them through this scripting.
Apart from this i want to achieve the following working -
This will go in a loop for many blender scenes same like you did for .obj files but instead i want to do the same for blender whole scene file with proper lighting.
From above points I have checked the 1 and 4 point and i hope i will be able to achieve the 2 and 3 point also. But my problem is when i open a blender file using following script -
obj_root = pathlib.Path("I:/PythonBlender/first.blend") bpy.ops.wm.open_mainfile(filepath= str(obj_root))
the old file running the python scripts is closed and this new first.blend file is opened in blender. I want my python scripts to keep running and the scenes should load as an addon. and remove the addon scenes after rendering is finished.
Please help me achieve this functionality. Thankyou so much
21st October 2020 - 12:00
*@gagan.zedinteractive* not sure if it will work, but I think you should try appending the scene to the current blend file instead of opening a new .blend (as you are in fact running a separate instance of blender) , this I guess should leve the script running and allow you to interact with the additional scene in your original .blend (not sure how to do it in python though)
Sybren A. Stüvel
25th April 2022 - 09:11
@gagan.zedinteractive You can start another Blender instance from Blender itself. That's the easiest way to get this kind of processing done. Run
blender --helpto see all the possible options. Probably the form you'd want to use is
blender.exe thefile.blend -P thescript.py, where
thescript.pytakes care of everything that needs to happen with that particular file.