From 6e49e57ba8893cbe8c6149dbb3282271552c55b7 Mon Sep 17 00:00:00 2001 From: Aina Olaoluwa <115317659+drune9d@users.noreply.github.com> Date: Sat, 1 Aug 2026 04:48:02 -0700 Subject: [PATCH] Support newer Blender material settings --- README.md | 2 +- __init__.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c73968f..8f4503e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A Blender addon for easier/better compositing in 3D space. This addon is currently beta quality. There may still be major bugs and rough edges, but in general it should *basically* work. Due to limitations in Blender's Python APIs there are also some rough edges that are unforunately impossible to fix at the moment. -This addon requires Blender 4.0 or later. +This addon requires Blender 4.0 through Blender 5.0. # License diff --git a/__init__.py b/__init__.py index e3116e4..ffb1fe8 100644 --- a/__init__.py +++ b/__init__.py @@ -161,7 +161,10 @@ def create_compify_material(name, camera, footage): mat = bpy.data.materials.new(name) mat.use_nodes = True mat.blend_method = 'HASHED' - mat.shadow_method = 'HASHED' + if hasattr(mat, "shadow_method"): + mat.shadow_method = 'HASHED' + elif hasattr(mat, "surface_render_method"): + mat.surface_render_method = 'DITHERED' for node in mat.node_tree.nodes: mat.node_tree.nodes.remove(node)