Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ 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'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Instead of removing this, you could create a function that will work in both environments:

def _set_hashed_shadow(mat):
    """
    Make a material cast alpha‑hashed (dithered) shadows on
    every Blender version that still supports the add‑on.
    """
    if hasattr(mat, "shadow_method"):                       # Blender 2.8 – 3.6
        mat.shadow_method = 'HASHED'
    elif hasattr(mat, "surface_render_method"):             # Blender 4.0 +
        # ‘DITHERED’ == hashed transparency in Eevee‑Next
        mat.surface_render_method = 'DITHERED'

Than call that in place of the removed line. This seems to work as far as 5.0.

for node in mat.node_tree.nodes:
mat.node_tree.nodes.remove(node)

Expand Down