Skip to content

Commit

Permalink
Appleseed: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
howetuft committed Jun 24, 2024
1 parent 93b353a commit c58d61e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Render/renderers/Appleseed.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

SHADERS_DIR = os.path.join(os.path.dirname(__file__), "as_shaders")

PARAMS = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Render")

# ===========================================================================
# Write functions
Expand Down Expand Up @@ -1238,13 +1239,12 @@ def test_cmdline(batch):
This function allows to test if renderer settings (path...) are correct
"""
params = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Render")
if not batch:
# GUI
rpath = params.GetString("AppleseedStudioPath", "")
rpath = PARAMS.GetString("AppleseedStudioPath", "")
else:
# Console
rpath = params.GetString("AppleseedCliPath", "")
rpath = PARAMS.GetString("AppleseedCliPath", "")
return [rpath, "--help"]


Expand Down Expand Up @@ -1489,16 +1489,15 @@ def enclose_rpath(rpath):
f.write(template)

# Prepare command line parameters and rpath
params = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Render")
if not batch:
# GUI
rpath = params.GetString("AppleseedStudioPath", "")
rpath = PARAMS.GetString("AppleseedStudioPath", "")
args = ""
output_file = None
else:
# Console
rpath = params.GetString("AppleseedCliPath", "")
if args := params.GetString("AppleseedParameters", ""):
rpath = PARAMS.GetString("AppleseedCliPath", "")
if args := PARAMS.GetString("AppleseedParameters", ""):
args += " "
args += f"""--output "{output_file}" """
if spp:
Expand Down

0 comments on commit c58d61e

Please sign in to comment.