0
$\begingroup$

I'm kind of newbie at Blender at the moment...

I'd like to know if there's any way to render multiple models with scripting (python)

Like, let's say, I have 1 model (a cat) and different accesories (hats, glasses, etc) and I'd like to batch render using scripting for assigning which configuration (model + accesory) I want, and then other configuration, and so on...

Do I have to add all accesories and just hide/unhide in scripting? Or is there any way to assign IDs to accesories so the script will import them and set them from a local folder?

$\endgroup$
0
$\begingroup$

Both of your speculative solutions could work, it really is down to what you are willing to deal with in both your code and your scene.

What I would do is have your accessories in a scene collection, have where your accessories will go defined by an empty, and then have your script iterate over the accessories it finds in that collection.

What you then could do is for every object it finds, go to a unique frame of animation, shift the object to the empty location, unhide it, add keyframes to the transform and hide/render aspects of the accessory, repeat.

Then you could render out all your combinations as an animation, to a set of frames.

Loading/Linking files is kind of hard to do programmatically, so you would at least need to link everything into the current file.

$\endgroup$
1
  • $\begingroup$ Thanks for your reply. Do you know what kind of script can I look for? I mean, I kind of know what I need but don't know the words for searching the script I need. $\endgroup$
    – Veg Chain
    Dec 8 '21 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.