Skip to content

Commit

Permalink
Compatibility with Blender 4.3 (EEVEE Next)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregzaal committed Jul 10, 2024
1 parent 515c006 commit e48f0ff
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"name": "Gaffer",
"description": "Master your lighting workflow with easy access to light properties, HDRIs and other tools",
"author": "Greg Zaal",
"version": (3, 2, 2),
"version": (3, 2, 3),
"blender": (3, 4, 0),
"location": "3D View > Sidebar & World Settings > HDRI",
"warning": "",
Expand Down
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import bpy
import os

supported_renderers = ["CYCLES", "BLENDER_EEVEE"]
supported_renderers = ["CYCLES", "BLENDER_EEVEE", "BLENDER_EEVEE_NEXT"]

col_temp = {
"01_Flame (1700)": 1700,
Expand Down
2 changes: 1 addition & 1 deletion functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def get_next_available_value_socket(node):

objects = sorted(scene.objects, key=lambda x: x.name)

if scene.render.engine in ["CYCLES", "BLENDER_EEVEE"]:
if scene.render.engine in ["CYCLES", "BLENDER_EEVEE", "BLENDER_EEVEE_NEXT"]:
for obj in objects:
light_mats = []
if obj.type == "LIGHT":
Expand Down
10 changes: 7 additions & 3 deletions ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,11 @@ def draw_unsupported_renderer_UI(context, layout, lights):
row.label(text="No lights to show :)")

# World
if context.scene.world and gaf_hdri_props.hdri_handler_enabled and context.scene.render.engine in ["BLENDER_EEVEE"]:
if (
context.scene.world
and gaf_hdri_props.hdri_handler_enabled
and context.scene.render.engine in ["BLENDER_EEVEE", "BLENDER_EEVEE_NEXT"]
):
box = layout.box()
worldcol = box.column(align=True)
col = worldcol.column(align=True)
Expand Down Expand Up @@ -925,7 +929,7 @@ def draw(self, context):

if scene.render.engine == "CYCLES":
draw_cycles_eevee_UI(context, layout, lights)
elif scene.render.engine == "BLENDER_EEVEE":
elif scene.render.engine in ["BLENDER_EEVEE", "BLENDER_EEVEE_NEXT"]:
draw_cycles_eevee_UI(context, layout, lights)
else:
draw_unsupported_renderer_UI(context, layout, lights)
Expand Down Expand Up @@ -1398,7 +1402,7 @@ class GAFFER_PT_hdris(bpy.types.Panel):

@classmethod
def poll(cls, context):
return context.scene.render.engine in ["CYCLES", "BLENDER_EEVEE"] and context.scene.world
return context.scene.render.engine in ["CYCLES", "BLENDER_EEVEE", "BLENDER_EEVEE_NEXT"] and context.scene.world

def draw_header(self, context):
gaf_hdri_props = context.scene.world.gaf_hdri_props
Expand Down

1 comment on commit e48f0ff

@gregzaal
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant 4.2 :)

Please sign in to comment.