Page 1 of 1

Render Settings to Default Values

Posted: Fri Oct 26, 2018 10:10 am
by johannes.wilde
Hey,

i'm trying a lot of different render settings in LuxCore lately and i see, that there really is a big difference between all the possible settings.

Sometimes i feel like resetting everything to default again, to get a new start from there. What do you think about a 'reset to default' button on bottom or top of the render settings panel?

BTW it's great fun to experiment with all that mighty features of LuxCore.
Thanks!

Re: Render Settings to Default Values

Posted: Fri Oct 26, 2018 10:32 am
by B.Y.O.B.
You can right click on any setting and select "Reset to default" from the menu.

If you want to reset all config properties at once, use this script:
(paste it into a text editor in Blender and press "Run Script")

Code: Select all

import bpy

def get_members(root):
    return [attr for attr in dir(root) if not callable(getattr(root, attr)) and not attr.startswith("__")]

def unset_recursive(root):
    for member in get_members(root):
        try:
            old = getattr(root, member)
            root.property_unset(member)
            new = getattr(root, member)
            if old != new:
                print("Reset prop to default:", member, "(was: " + str(old) + ", now: " + str(new) + ")")
            unset_recursive(member)
        except Exception:
            pass

print("---")
unset_recursive(bpy.context.scene.luxcore.config)
print("---")
It will lead to an output like this:

Code: Select all

---
Reset prop to default: device (was: OCL, now: CPU)
Reset prop to default: sampler (was: METROPOLIS, now: SOBOL)
Reset prop to default: seed (was: 23, now: 1)
---

Re: Render Settings to Default Values

Posted: Fri Oct 26, 2018 10:46 am
by johannes.wilde
Thanks, perfect.
That's exactly what i wanted to know. I was just to stupid to find! :)