1
$\begingroup$

I have several scenes in a blend file.
Sometimes I want to render all scenes with lower resolution, or mute some of the input nodes in the compositor of all the scenes.

I can accomplish the above by using --python-text and loop statement, but I want to use --python-expr, which can be edited immediately in Notepad because I want to modify variables frequently.

But I don't know how to use loop statement in python-expr.
As far as I know expression should be a single line, but loop statements should be newline and indented.

Q: Is there a way to use loops for --python-expr?

$\endgroup$
2
  • 1
    $\begingroup$ Would say it's the same as passing a command to python -c <command> Skeptical re previous comments Are you typing in notepad, copying and pasting to console? Can you elaborate? Recommend looking at blender.stackexchange.com/questions/6817/… to pass your "variables". $\endgroup$ – batFINGER Feb 27 '20 at 11:04
  • 1
    $\begingroup$ Yes. I have a txt file with code for CMD written in notepad to manage rendering for blend files. And when rendering, copy the code from txt file to CMD. This is the best of my knowledge. But as you say, this approach will be limited to sophisticated manipulation. So I read through the links you recommended and I think this is the way I should go. I will take a closer learn. $\endgroup$ – J. SungHoon Feb 27 '20 at 16:54

Your Answer

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

Browse other questions tagged or ask your own question.