2
$\begingroup$

I have tried writing a simple script to set up de-noising and a render sample of 100 on Blender 2.93 with a simple cube animation.

bpy.context.scene.cycles.samples = 100

The reason is that we want to be able to quickly override the preset samples in .blend files that are uploaded on our server without having to reupload each time.

I've tried many different variations of this start-up script from many different forums, but the samples always remain how they are set in the file (in this case two samples)

 .\blender -P 100_samples.py -b "cube_animation.blend" -o "\001\####" -a

I tried following the advice here How to change render samples using python, but it is too complex a solution for what we need, and I can't extract the line(s) that are necessary.

$\endgroup$

1 Answer 1

3
$\begingroup$

.\blender -P 100_samples.py cube_animation.blend first runs the script, then opens the .blend file.

.\blender cube_animation.blend -P 100_samples.py first opens the .blend file, then runs the script.

$\endgroup$

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.