Skip to content

Commit

Permalink
Fix for 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ksami authored Sep 6, 2024
1 parent 7e0356a commit 56bcac2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,8 +1389,10 @@ def execute(self, context):
return {'FINISHED'}

def modal(self, context, event):
if bpy.context.scene.render.engine not in ["CYCLES", "BLENDER_EEVEE"]:
if bpy.app.version < (4, 2, 0) and bpy.context.scene.render.engine not in ["CYCLES", "BLENDER_EEVEE"]:
bpy.context.scene.render.engine = "BLENDER_EEVEE"
elif bpy.context.scene.render.engine not in ["CYCLES", "BLENDER_EEVEE_NEXT"]:
bpy.context.scene.render.engine = "BLENDER_EEVEE_NEXT"
try:
old_objects = [o.name for o in bpy.data.objects] # Get the current objects inorder to find the new node hierarchy
bpy.ops.import_scene.gltf(filepath=self.gltf_path)
Expand Down

0 comments on commit 56bcac2

Please sign in to comment.