Skip to content

Commit

Permalink
Regain compatibility with Blender 2.83
Browse files Browse the repository at this point in the history
  • Loading branch information
BeheadedKamikaze committed May 20, 2021
1 parent c21920e commit f4b2ff5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__pycache__
superimagedenoiser_updater
42 changes: 35 additions & 7 deletions SID_Panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def draw(self, context: Context):
view_layer = context.view_layer
cycles_view_layer = view_layer.cycles

# do we have to use the old layout engine?
legacy_layout = bpy.app.version < (2, 90)

# currently rendering noisy frames?
is_rendering = denoise_render_status.is_rendering
# currently denoising?
Expand Down Expand Up @@ -97,7 +100,7 @@ def draw(self, context: Context):
elif settings.quality == 'SUPER':
if RenderEngine == 'octane':
quality.label(
text="Renderrer does not support super quality.", icon='INFO'
text="Renderer does not support super quality.", icon='INFO'
)
quality.label(
text=" Will use high quality setting instead"
Expand All @@ -118,7 +121,8 @@ def draw(self, context: Context):
)

subpasses = passes.row(align=True)
subpasses
subpasses.use_property_split = False

##############
### CYCLES ###
##############
Expand Down Expand Up @@ -240,8 +244,8 @@ def draw(self, context: Context):
fileio.prop(settings, "outputdir", text="Clean EXR images")
fileio.separator()

col = fileio.column(heading="Existing Files")
col.prop(scene.render, "use_overwrite", text="Overwrite")
col = fileio.column(align=True)
col.prop(scene.render, "use_overwrite", text="Overwrite existing files")
layout.separator()

tdrender = layout.column(align=True)
Expand Down Expand Up @@ -269,15 +273,39 @@ def draw(self, context: Context):
tdsettings = layout.column()
tdsettings.active = panel_active and (cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes)

row = tdsettings.row(heading="Diffuse", align=True)
if legacy_layout:
split = tdsettings.split(factor=0.5)
col = split.column()
col.alignment = 'RIGHT'
col.label(text="Diffuse")
row = split.row(align=True)
row.use_property_split = False
else:
row = tdsettings.row(heading="Diffuse", align=True)
row.prop(cycles_view_layer, "denoising_diffuse_direct", text="Direct", toggle=True)
row.prop(cycles_view_layer, "denoising_diffuse_indirect", text="Indirect", toggle=True)

row = tdsettings.row(heading="Glossy", align=True)
if legacy_layout:
split = tdsettings.split(factor=0.5)
col = split.column()
col.alignment = 'RIGHT'
col.label(text="Glossy")
row = split.row(align=True)
row.use_property_split = False
else:
row = tdsettings.row(heading="Glossy", align=True)
row.prop(cycles_view_layer, "denoising_glossy_direct", text="Direct", toggle=True)
row.prop(cycles_view_layer, "denoising_glossy_indirect", text="Indirect", toggle=True)

row = tdsettings.row(heading="Transmission", align=True)
if legacy_layout:
split = tdsettings.split(factor=0.5)
col = split.column()
col.alignment = 'RIGHT'
col.label(text="Transmission")
row = split.row(align=True)
row.use_property_split = False
else:
row = tdsettings.row(heading="Glossy", align=True)
row.prop(cycles_view_layer, "denoising_transmission_direct", text="Direct", toggle=True)
row.prop(cycles_view_layer, "denoising_transmission_indirect", text="Indirect", toggle=True)

Expand Down
4 changes: 2 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
bl_info = {
"name": "Super Image Denoiser (SID)",
"author": "Kevin Lorengel, Chris Bond (Kamikaze)",
"version": (2, 9),
"blender": (2, 92, 0),
"version": (2, 91),
"blender": (2, 83, 0),
"location": "Properties > Render > Create Super Denoiser",
"description": "SID denoises your renders near-perfectly, with only one click!",
"warning": "",
Expand Down

0 comments on commit f4b2ff5

Please sign in to comment.