2
$\begingroup$

I am setting up a project where while in the viewport, glossy light paths must be set to 0. But when the user renders I need to set glossy paths to 1. I have no experience with blender python or drivers in general but if Im not mistaken this should be possible right?

$\endgroup$

1 Answer 1

1
$\begingroup$

This isn't really a task for drivers and is probably best done with Application Handlers. I would do this by registering handlers for render.pre and render.post. The pre handler would set glossy paths to 1 and the post to 0, of course.

To be extra careful you might want to add an additional function that blender calls at startup to ensure that glossy paths is set to 0 initially. Do be aware of the warning about persistent handlers at the start of the manual section on Application Handlers.

This all assumes this is meant for Cycles.

$\endgroup$
2
  • 1
    $\begingroup$ Ahh alright thanks so much $\endgroup$
    – ben
    Commented Apr 6, 2022 at 2:05
  • $\begingroup$ @ben you're welcome. Good luck with your setup. $\endgroup$ Commented Apr 6, 2022 at 16:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .